C and Cpp

Discussion in 'Programmer's Corner' started by Rajadurai, Feb 6, 2011.

  1. Rajadurai

    Thread Starter New Member

    Feb 6, 2011
    HOw to Change the C programme into Cpp Programme
  2. AlexR

    Well-Known Member

    Jan 16, 2008
    Why do you want to change it? A C program should compile on a Cpp compiler without any modification.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    Add a PP??? :)

    CPP compilers can compile C.

    You will need to give a whole lot more detail if you want help.

    But a course in CPP programming is well beyond the scope of this forum. There are many classes that can be found online.
  4. elavarasu

    New Member

    Feb 9, 2011
    It is possible both c programs and c++ programs runs under c++compilers.

    if you are write a program in c platform ,you will need to save the program(filename.c)(.c extension)(for ex:coffee vending machine.c)

    if you are write a program in c++ platform ,you will need to save the program(filename.cpp)(.cpp extension)(for ex:coffee vending machine.cpp)

    but the only problem is ,if you are write a pgm in c platform using it's function,it will not to convert a .cpp file

    because input and output functions are different.

    the upcoming versions compilers are
    a)borland C++
    b)turbo c