I'm learning C++ using the cplusplus website tutorials. I'm using the following software:
- CentOS 6.4
- Code::Blocks 10.05
- GCC 4.4.7
these are the latest versions available from yum. As I was following the tutorial, I noticed that a lot of what it was saying did not work for me. For example, I can't prefix strings with 'u', 'U', 'L', etc. Also, 'nullptr' is not recognized, it produces a compiler error. I looked around and noticed that these features were added in C++11. So of course I thought I must have an old version of C++.
According to the GCC documentation in section 2.2 of this page, "The default, if no C++ language dialect options are given, is -std=gnu++98".
So I figured I need to specify -std=gnu++0x. I tried putting that in my Code::Blocks compiler arguments but it changed nothing. Instead I checked the compiler flag "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]". That also changed nothing.
Can somebody please tell me what I need to do to get Code::Blocks and GCC to use the current version of C++?