• Advertisement

Archived

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

C or C++ I have lost my mind.

This topic is 6567 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

Actually DarkMage139, C++ helps in preventing bugs in the first place. C code is much more prone to bugs.

Share this post


Link to post
Share on other sites
Advertisement
C++ is only slower than C is you use a bad compiler, or if you don''t know what the hell you''re doing.

Share this post


Link to post
Share on other sites
I agree, if you use the same compiler for C or C++, it'll compile the same either way.

For games I don't see why you wouldn't want to use C++. With OOP, you can have each character a class and just tell a character "moveTo(x,y)" and your class takes care of how the animation should work for the character to move to that location. Anytime you deal with virtual objects, you'll almost always benefit from using OOP.

Besides, most advancements in programing deal with C++, not C. Almost all the newest compilers can compile C++, and if you ever decide to learn Java, you'll already have an idea on how to structure your programs.

BTW: I don't believe that C++ programs should be totaly object orientated. All the programs I've written have been pretty much procedural. I use OOP as either a database, or to represent a virtual object. I've seen many people who use OOP for all their programs, even those that would be much smaller and faster if written procedurally.

A good example of different ways of programming in C++ can be found at:

http://www.ionet.net/~timtroyr/funhouse/beer/beer_a_c.html#cpp

(scroll down a ways and you'll see the C version of the program)


E:cb woof!

Edited by - dog135 on 1/26/00 6:46:31 PM

Share this post


Link to post
Share on other sites

  • Advertisement