Should I be using the latest standard?


Godmil

Active Member
Joined
May 6, 2006
Messages
585
Website
www.godmil.com
I've been learning C++ for the last few months, mostly for making games with SDL, but I also like doing the odd Project Euler puzzle.  I was wondering, while I'm still very new to it and constantly learning new stuff, if I should be making sure I'm following the latest standard (c++11) or would it be better to stick with the older version of the language like 98?  I'm not sure if there are issues around compatability.  (incidently I'm currently developing for Windows and the Rasp Pi, though naturally the Pandora will be added at some point.)
 
If you don't need the new features, it's better to stick with the old C++, so you don't have to make sure you have the most recent compiler. E.g. on the Pandora if you just do opkg install gcc, you get gcc version 4.3.3, while you need at least 4.7 to have C++11 support. There's also the issue of having a recent enough version of glibc.

So for easy portability, I'd stay with C++98/03.
 
Darn I feared that may be the case. I'd just been looking at how different c++11 is supposed to be used, it looked equal parts confusing and exciting. So are you saying the latest versions of gcc aren't available for the pandora, or just aren't the most common? I feel like I should be trying to keep up with modern techniques, but it also seems like a completely different language, and I don't want to end up getting confused between the different versions. :/
 
The difference between C++98 and C++11 is not huge, and everything you learn about C++98 will be the same in C++11.

The latest versions of gcc are available for Pandora, e.g. in the Code::Blocks PND.
 
C++11 is fun. Would be glad for support on pandora's cross compile chains :)

My two favorite new features are lambdas and initializer lists.
 
Back
Top