I wonder if it is possible to convert a code c + + in to c program , and if so how? Any recommendations and suggestions are appreciated.
I wonder if it is possible to convert a code c + + in to c program , and if so how? Any recommendations and suggestions are appreciated.
in general, C is compatible with C + +.
If you create C code, you're almost sure it will work directly... C + + will ask you to castes such as malloc (it's dirty, but it works)
The cleanest method is to keep your portion C in one (or more) of your files, which will be named. C and listed, you can save files. Cpp which call functions. C (via a. H)
it works very well ...
C++ is a superset of C so any C program can be compiled and run as a C++ program(doesn't change the fact that it is really C). Do not forget a extern "C" when it includes a header in C code C + + (so that the linker is found there; the agreement to generate the symbols are different between C and C + +).
The C version of the program uses stack library. The C++ version uses a stack object to implement the program. In C program require a function call for every single compare, whereas the C++ implementation would allow the compiler to inline the integer comparison calls.
tell me how may i convert C++ coding to C syntax .... rply me fast ....!!
Bookmarks