I really want to learn C++ with a passsion but...

Started by
13 comments, last by Spoonbender 17 years, 11 months ago
Quote:Original post by quasar3d
There really isn't that much language difference between gcc and visual c++ anymore. the 2005 compiler is very standard compliant, so don't be affraid that you learn wrong c++ or something.

http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=221


Advertisement
I'm not sure if you are the same AP that said "because you are much more likely to learn MS specific C++ stuff that may not be applicable to or available on other platforms when using MSVC++," but if you are that link does not really support your point, because it illustrating (primarily) changes made the IDE and compiler that made it MORE standard compliant. The exception would be in the first paragraph when they mentioned that some changes related to proprietary Microsoft APIs will break existing code. But that deals with MS-proprietary APIs... not language standards compliance.

I've got new for you: every compiler in existence supports non-standard extensions. Its just as easy to find yourself a C++ tutorial that advocates the use of #pragma once (potentially compiler-specific) as #ifndef guards. Or one that illustrates structure packing via #pragma pack (VS specific) or __attribute(pack) (GCC specific; but I may have the syntax incorrect).

An easy way to recognize compiler-specific extensions and keywords is that they involve #pragma's or identifiers starting with reserved tokens (such as __). That's what those mechanisms are there for. It's not the compiler that's going to make you more likely to learn compiler-specific extensions, its a bad tutorial or book that uses them without pointing out the dangers of doing so. Trying out multiple IDEs to get a feel for which you like best is an excellent way to discover if a tutorial has misinformed you about the "standardness" of a given keyword/operation/whatever.

To the OP, I suggest you try out VS Express, DevC++ and Code::Blocks which are easily the top three IDEs for the Windows platform. "Correct" C++ will work identically on all three (so hopefully you've found a good tutorial or book); experiment with all three and pick the one you like best.
Quote:Original post by lordmenace
Life dream to code a game ^_^.


In that case, please consider the possibility that you do not in fact want to learn C++. There are lots of options out there.
Wow, thanks guys for the amazing responses. I will play around with a few tutorials, and then when the C++ workshops come in, I will begin learning fully. Thanks.
Quote:Original post by Zahlman
Quote:Original post by lordmenace
Life dream to code a game ^_^.


In that case, please consider the possibility that you do not in fact want to learn C++. There are lots of options out there.


Quoted for emphasis.

Repeat after me, please. You don't need to start with C++.
It is not "better" to start with C++.
It is not "faster" to start with C++.
It is not "easier" to start with C++.
It will not make it easier to get into the industry if you start with C++.
C++ will not let you make "better" games.

Got that? Good, now let me explain.
First, yes, C++ is widely used for professional games for various reasons.
But that doesn't matter. Every good programmer knows more than one language anyway. What you learn in one language can easily be transferred to other languages, and the more languages you know, the better. It'll even make you a better C++ programmer, because your thinking won't be restricted by what features C++ programs typically rely on.
And while this might sound odd, you can start with, say, Python, and then learn C++ afterwards in about the same time it'd take you to learn C++ as your first language. So starting with C++ is not even a shortcut.
Second, learning C++ can be needlessly hard, frustrating and discouraging. It forces you to spend too much time fiddling with weird syntax errors and subtle pointer errors that don't actually teach you anything about programming, but rather takes time away from it. these issues are much easier to tackle if you already know some programming. That is, if you're already familiar with another language. Then you can focus on C++'s quirks rather than try to learn programming *at the same time* as you're struggling with those.
And yes, C++ is the industry standard. But other languages are widely used as well. Python is used for scripting in many games (Civ 4 relies heavily on it, for example). Learning that is valuable too. Don't assume C++ is the ticket to a job in the industry. It isn't. Being a good programmer who knows the tools they use, is a good start. But they use more than just C++.
And last point, you can make great games in any language. Crash Bandicoot was made in Lisp.

In the long term, it doesn't make any difference what language you started with once upon a time. But in the short term, it's a lot easier to get to grips with other languages like Python or maybe C#. They'll get you started faster, meaning you'll be able to see results, and make games faster. And they'll make it *much* easier to learn C++ later on.

Ok, this little pep talk should hopefully have dispelled any of those vague impressions beginners always get that "There's C++ and then there's everything else".

Of course, it's possible to start with C++. Plenty of people have done it before. I'm not arguing that you can't do it. I just want to get rid of the silly notion that you *have to*, or *should* learn C++ if you want to make games.

In the end, the choice is yours though. There are plenty of people here who will help you with any language you choose.

Oh, one final piece of advice. Don't rely on tutorials. Buy a book instead. There's a huge difference in quality.

Good luck. [wink]

This topic is closed to new replies.

Advertisement