LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 09-05-2007, 04:36 AM   #1
Grife
Member
 
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, 05:04 AM   #2
Mega Man X
Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 63
Maybe this?
 
Old 09-05-2007, 10:40 AM   #3
Michael_S
Member
 
Registered: Oct 2004
Location: Pennsylvania, USA
Distribution: Debian
Posts: 78

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?
 
  


Reply


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 LinuxQuestions.org Member Intro 3 04-05-2007 06:48 AM
new convert tems LinuxQuestions.org Member Intro 2 02-15-2007 04:34 PM
To convert. eklipsep Linux - Newbie 10 05-16-2005 04:27 PM
Am I a convert?? SlackerLX LinuxQuestions.org Member Success Stories 22 01-12-2005 03:01 PM
Want to Convert, but Can't New2Lindows Linux - General 4 08-14-2003 02:52 AM


All times are GMT -5. The time now is 10:16 AM.

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