943,458 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2083
  • C++ RSS
Sep 7th, 2004
1

Tool Needed

Expand Post »
Hi

i want to convert my C project to C++. so does anyone knows any tool that converts a C program to C++
Similar Threads
Reputation Points: 12
Solved Threads: 0
Newbie Poster
vivekgalatage is offline Offline
6 posts
since Aug 2004
Sep 7th, 2004
1

Re: Tool Needed

The Brain - the one and only
Reputation Points: 108
Solved Threads: 7
Posting Whiz in Training
FireNet is offline Offline
256 posts
since May 2004
Sep 7th, 2004
0

Re: Tool Needed

Hello,

You shouldn't need it, unless you have a bunch of libraries, or are using depreciated methods to implement your thingy. C++ is an extension (add-in) to C, and you can get printf and a bunch of other functions to work just fine within it.

Now, if you are looking for unified code, then I think it is going to be a manual process indeed. IN that case, you could convert your libraries one at a time, as they should still link fine. I am not aware of any big hiccups here.

Christian
Team Colleague
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
kc0arf is offline Offline
1,629 posts
since Mar 2004
Sep 7th, 2004
1

Re: Tool Needed

Compilers are usually set up to compile files with ".c" extensions as C and ".cpp" as C++; so if you are going to add C++ only stuff, the first thing to do is rename your .c files as .cpp. (and update the project file accordingly)

Once you do that, you should be able to build and run, and then you can incrementally add/change things to use C++ syntax extensions.
Reputation Points: 36
Solved Threads: 11
Posting Pro in Training
Chainsaw is offline Offline
436 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: PSP Help.
Next Thread in C++ Forum Timeline: ive found many ebooks





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC