LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Best way to convert C to C++? (https://www.linuxquestions.org/questions/programming-9/best-way-to-convert-c-to-c-582309/)

Grife 09-05-2007 03:36 AM

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.

Mega Man X 09-05-2007 04:04 AM

Maybe this?

Michael_S 09-05-2007 09:40 AM

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?


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