Results 1 to 5 of 5

Thread: Convert C++ program into C

  1. #1
    Join Date
    Oct 2009

    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.

  2. #2
    Join Date
    May 2008

    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 ...

  3. #3
    Join Date
    Jan 2009

    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 + +).

  4. #4
    Join Date
    Dec 2008

    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.

  5. #5
    Join Date
    Jan 2010

    Re: Convert C++ program into C

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

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts