Thursday, July 30, 2009

Can c++ program be compiled on c compiler?

Well, sort of. You would have to alter some of the include file entries and recode most of the class calls. The very basics would be OK.





If you are going back and forth, this will drive you NUTS.

Can c++ program be compiled on c compiler?
no..


as far i as i know u can run ur c programs in c++, but


u cant run ur c++ programs in c.
Reply:You can't go backwards. C++ is an extension or superset of C, meaning that it has more key words and operators. Therefore, no, you can't compile a C++ program on a strictly C compiler. The one thing that you will have a possibility of doing is compiling a C program on a C++ compiler, and errors can creep in here depending on the code used. Fortunately, there are very few compilers left in the world that are incapable of doing both. That is to say, compatibility modules are shipped with most modern compilers or IDE's intended for C++. So, you can likely find a C++ compiler for free quit easily, maybe even the one you have now. Check your documentation, then if you need to get a free compiler try the URL below. They also have tutorials, articles, editors and compilers in other languages.
Reply:sometimes yes, c++ program can be compiled on c compiler.


for example if it has cin , cout, the answer will be no.
Reply:no
Reply:C++ is an upgraded version of C. And yes you can compile a C++ program using C compiler, provided you used biult-in function in C++ that is in C. Functions such as 'print', 'scan'.





For more free C++/C source codes, visit, http://smartcoder.awardspace.com/


Then go to the C++/C category.





KaBalweg


http://smartcoder.awardspace.com/

snow of june

No comments:

Post a Comment