Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Convert C++ program into C

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 31-10-2009
Members
 
Join Date: Oct 2009
Posts: 1
Convert C++ program into C
  

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.

Reply With Quote
  #2  
Old 31-10-2009
Member
 
Join Date: May 2008
Posts: 2,290
Re: Convert C++ program into C

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 ...
Reply With Quote
  #3  
Old 31-10-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Convert C++ program into C

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 + +).
Reply With Quote
  #4  
Old 31-10-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Convert C++ program into 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.
Reply With Quote
  #5  
Old 07-01-2010
Member
 
Join Date: Jan 2010
Posts: 1
Re: Convert C++ program into C

tell me how may i convert C++ coding to C syntax .... rply me fast ....!!
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Convert C++ program into C"
Thread Thread Starter Forum Replies Last Post
Convert C++ Program to Java Code!! Please help jessesaini Software Development 1 24-04-2012 12:24 AM
c program to convert decimal to binary Oswaldo Software Development 3 25-11-2009 02:45 PM
Program to convert xif SmokiN Windows Software 3 22-06-2009 09:13 PM
How To Convert Any Windows Program to Run on a U3 Drive Ebenezer Operating Systems 2 24-04-2009 03:01 PM
How can I convert my java program to an .exe file? Baran Software Development 3 02-03-2009 06:04 PM


All times are GMT +5.5. The time now is 03:00 AM.