Seeing from your G++ version, you need to update it badly. C++11 has only been available since G++ 4.3. The most recent version is 4.7.
In versions pre-G++ 4.7, you’ll have to use -std=c++0x
, for more recent versions you can use -std=c++11
.
Related Posts:
- Compiling C++11 with g++
- Issue with std::stol – ‘std::invalid_argument’ what(): stol
- error: use of deleted function
- extra qualification error in C++
- Call to non-static member function without an object argument compiler error
- Compiling C++11 with g++
- What is the difference between g++ and gcc?
- What is the ‘override’ keyword in C++ used for? [duplicate]
- What is a smart pointer and when should I use one?
- C++ std::priority_queue uses the lambda expression
- C++ undefined reference to defined function
- Usage and Syntax of std::function
- What exactly is nullptr?
- Difference between `constexpr` and `const`
- Split a string using C++11
- How to create timer events using C++ 11?
- error: expected unqualified-id error: Meaning and fix? [duplicate]
- c++ compile error: ISO C++ forbids comparison between pointer and integer
- error: redefinition of class
- C++ Error: No match for ‘operator=’
- Identifier not found error on function call
- Undefined reference to vtable
- What does T&& (double ampersand) mean in C++11?
- Identifier not found error on function call
- make: g++: Command not found
- What is an ‘undeclared identifier’ error and how do I fix it?
- Segmentation fault error 11 C++
- Undefined reference to vtable
- Why doesn’t C++ have a garbage collector?
- terminate called after throwing an instance of ‘std::invalid_argument’ what(): stoi
- What exactly is std::atomic?
- what does “error : a nonstatic member reference must be relative to a specific object” mean?
- “g++” is not recognized as an internal or external command, MinGW
- terminate called after throwing an instance of ‘std::out_of_range’
- “Symbol(s) not found for architecture x86_64” on QtCreator project
- Is there a tab equivalent of std::endl within the standard library?
- C++ error: “Array must be initialized with a brace enclosed initializer”
- Why am I getting string does not name a type Error?
- undefined reference to ‘std::cout’
- expression preceding parentheses of apparent call must have (pointer-to-) function type
- C++ error: Undefined symbols for architecture x86_64
- C++ terminate called without an active exception
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Thread pooling in C++11
- error: expected primary-expression before ‘)’ token (C)
- How does std::forward work? [duplicate]
- what does “error : a nonstatic member reference must be relative to a specific object” mean?
- Difference in make_shared and normal shared_ptr in C++
- printf with std::string?
- What is std::move(), and when should it be used?
- Undefined reference to class constructor, including .cpp file fixes
- push_back vs emplace_back
- Append an int to a std::string
- gcc/g++: “No such file or directory”
- Undefined reference to constructor
- Resolve build errors due to circular dependency amongst classes
- Call to implicitly deleted copy constructor in LLVM
- C++ Error ‘nullptr was not declared in this scope’ in Eclipse IDE
- error C2679: binary ‘<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
- Cannot open output file, permission denied
- no match for ‘operator<<’ in ‘std::operator
- Warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11?
- Use the auto keyword in C++ STL
- Error: free(): invalid next size (fast):
- Does C++11 have C#-style properties?
- I get this error: “glibc detected”
- Update GCC on OSX
- Undefined reference to class constructor, including .cpp file fixes
- Iterator Loop vs index loop
- initialize a vector to zeros C++/C++11
- When is it safe to call this-> in constructor and destructor
- How to memset char array with null terminating character?
- multiple definitions error in c++ and solution to solve this issue
- Stray ‘\342’ in C++ program
- How well is Unicode supported in C++11?
- System not declared in scope?
- How to automatically convert strongly typed enum into int?
- Difference between
and - too many initializers for ‘int [0]’ c++
- Getting a bunch of crosses initialization error
- overloaded function with no contextual type information
- error: ISO C++ forbids in-class initialization of non-const static member
- Creating folders in C++
- Expected unqualified-id before ‘[‘ token
- error C2065: ‘cout’ : undeclared identifier
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- What does “-Wall” in “g++ -Wall test.cpp -o test” do?
- Error: expression cannot be used as a function?
- What is a .h.gch file?
- ERROR C2039: ‘vector’: is not a member of ‘std’
- Does static constexpr variable inside a function make sense?
- c++ vector bubble sort
- Update g++ but still old version
- Unexpected end of file error
- virtual memory exhausted: Cannot allocate memory
- Compiler error C4430: missing type specifier – int assumed [duplicate]
- Link error “undefined reference to `__gxx_personality_v0′” and g++ [duplicate]
- How to use bitmask?
- I’m getting the error “stoi is not a member of std” in myprogramminglab [duplicate]
- Differences between unique_ptr and shared_ptr