Compiling C++11 with g++
问题 I'm trying to update my C++ compiler to C++11. I have searched a bit and I have come to the conclusion that I have to use the flag -std=c++0x or -std=gnu++0x , but I don't know many things about flags. Can anyone help me? (I'm using Ubuntu 12.04.) Here is the error that I get from the compiler when I attempt to use a library which is included in C++11 (i.e. array): #include <array> #include <iostream> int main() { std::array<int, 3> arr = {2, 3, 5}; ... } This file requires compiler and