Jump to content
  • Advertisement

Archived

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

Chappa

Do you use C or C++?

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

I'm ashamed to say that I started coding in C++ and missed C out altoghter and as a result I have a fair idea about where C stops and C++ takes over, but not nearly as much as I should have.

Share this post


Link to post
Share on other sites
Advertisement
I think good object oriented design is incredibly powerful, so consequently I do C++. Perhaps following posts will prove me wrong but it seems to me that I've come across a large number of folks that don't really like it. OO certainly doesn't make sense at first and it can be more difficult to work with but when its well done, especially on a large app, you'll sing its praises. That's my humble experience at least!

Share this post


Link to post
Share on other sites
I have to say that C++ makes code much easier to understand than straight C. It's much easier to think in terms of objects than a bunch of functions and data strewn all over the place.

------------------
Breakaway Games

Share this post


Link to post
Share on other sites
I think you'll find that most game developers know that there are problems with both C and C++. So they use a combination of the two languages commonly refered to as C+. This way they get the benefits of both languages with out also getting the problems that are associated with them.

Share this post


Link to post
Share on other sites
I use C++ with inline Assembly. I think that's the perfect combination, allowing a high level of abstraction with the low level speed and trickery that can only be accomplished with Assembly. I'm not a master at either language, but if I can't figure out how to do something in one of them, I get it done with the other.

------------------
When life hands you lemons, throw them at God's head.

Share this post


Link to post
Share on other sites
I use C++ for my anything in my code that objects would work well for. For the more procedural stuff I have found that it can be faster to use C to get the job done. Since there is little difference between the conventions used in both languages it can get real fuzzy over just exactly what I am using.

We have found that using the STL is a nasty performance hit on large scale systems. I also rewrote a string class to use a predefined string size so that I could optimize WindowsNT heap usage. I gues my answer would be that I use both C and C++ as Eva mentioned.

Kressilac

ps The decision usually relies on if I have C++ classes that can perform the same as C and still give the object oriented benefits. Cout, cin, and cerr all end up calling the C io functions so in many cases I skip the C++ layer altogether. As mentioned above CString is horribly slow and has been rewritten by my team. These just provide examples of what I stated above.

Share this post


Link to post
Share on other sites
For the most part we use C++, but certain low-level routines are coded in C such as leak detection. And some is in inline assembly.

We use none of the STL classes, instead we've ended implementing similar things in C++ to take advantage of our memory management libraries. The libraries themselves are C, but there are some thunks in C++ that make them operate transparently in C++.

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!