Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

AcRiD_aCiD

ctocpp translator

This topic is 5337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

does anyone here have the ctocpp translator that is supposed to be in this page? http://www.scriptol.com/ctocpp.php if you do, can pass to me? thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What on earth does that do ? if it ''converts'' c code to cpp code, you don''t need it as c code must compile correctly on a c++ compiler - ie you don''t need it if that is what you want to do

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
if it ''converts'' c code to cpp code, you don''t need it as c code must compile correctly on a c++ compiler - ie you don''t need it if that is what you want to do


I''m not sure that''s true, as the Quake 2 source code nearly exploded last time I tried to compile it as C++...then again, this was MSVC6, I dunno if it''s standards non-compliance stuff matters. Even so, I seriously don''t think that''s true.

Share this post


Link to post
Share on other sites
quote:
if it ''converts'' c code to cpp code, you don''t need it as c code must compile correctly on a c++ compiler

Bollocks.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
if it ''converts'' c code to cpp code, you don''t need it as c code must compile correctly on a c++ compiler


try this in c++ then and be amazed about the things that arent allowed in c++ anymore (though one might argue if for good reason):
isOdd(var){var%2;}

Share this post


Link to post
Share on other sites
quote:
Original post by DrPizza
quote:
if it ''converts'' c code to cpp code, you don''t need it as c code must compile correctly on a c++ compiler

Bollocks.



Dr "Subtle" Pizza, I presume? I believe what he meant to say was that, as, quite often, compiling code from one ''C'' compiler to the next requires a few changes, is it not likely that moving from a ''C'' to a ''C++'' compiler will require more changes? Maybe yes, maybe no, but don''t count on it working first time.

Ben H

Share this post


Link to post
Share on other sites
quote:
Original post by Hinch
Dr "Subtle" Pizza, I presume? I believe what he meant to say was that, as, quite often, compiling code from one ''C'' compiler to the next requires a few changes, is it not likely that moving from a ''C'' to a ''C++'' compiler will require more changes? Maybe yes, maybe no, but don''t count on it working first time.

More likely what he meant to say it''s just not true. While C++ is mostly a superset of C, it is not strictly so; there is a good deal of perfectly valid C code that is not valid C++ code at all. Some of this is because C has evolved (C99 is more recent than the C++ standard, after all!), some because C++ enforces a much stricter type system, et cetera.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!