Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-05-2007, 03:36 AM   #1
Registered: Oct 2006
Location: Finland
Distribution: openSUSE
Posts: 89

Rep: Reputation: 15
Best way to convert C to C++?

Could any of you give me any tips on how to most painlessly convert C to C++? I have this one eternity project and writing all over again manually doesn't sound fun.

I was thinking about using sed to convert syntax to C++ automagically, but that route has its own problems ofcourse.

If you have some witty sed scripts you'd like to share I'm not objecting against that. Other ways to get the job done are appreciated as well.
Old 09-05-2007, 04:04 AM   #2
Mega Man X
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Maybe this?
Old 09-05-2007, 09:40 AM   #3
Registered: Oct 2004
Location: Pennsylvania, USA
Distribution: Debian
Posts: 85

Rep: Reputation: 23
Why convert?

What do you need to convert? Can't you just keep all of your C code as C, and then write new pieces in C++ and use extern C references to call the C code?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi from a New Convert! jlconferido Member Intro 3 04-05-2007 05:48 AM
new convert tems Member Intro 2 02-15-2007 03:34 PM
To convert. eklipsep Linux - Newbie 10 05-16-2005 03:27 PM
Am I a convert?? SlackerLX Member Success Stories 22 01-12-2005 02:01 PM
Want to Convert, but Can't New2Lindows Linux - General 4 08-14-2003 01:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration