This is a guide about how can you add C++ 11 support to codeblocks with gnu gcc compiler mingw.
Steps:
1. Open Codeblocks;
2. Go to Settings -> Compiler -> Compiler Settings -> Compiler Flags -> click on: "Have g++ follow the C++11 ISO C++ language standard [-std=c++11]";
if this doesn't work for you go the next line:
"Have g++ follow the coming C++0x ISO C++ language standard [-std=C++0x]";
These are the few things than will be able to use after this:
- null pointer initialization with nullptr;
Example:
int c*;
c=nullptr;
- scoped enums;
Example:
enum name {write, black, green};
name ename;
ename=name::black;
-much more