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?
- Why is “using namespace std;” considered bad practice?
- What is a lambda expression in C++11?
- ld: symbol(s) not found for architecture x86_64 error
- How to find out if an item is present in a std::vector?
- What is the ‘override’ keyword in C++ used for? [duplicate]
- What is a smart pointer and when should I use one?
- Meaning of = delete after function declaration
- 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=’
- How do I reverse a C++ vector?
- How does #include
work in C++? - Replace part of a string with another string
- Identifier not found error on function call
- Undefined reference to vtable
- What is an ‘undeclared identifier’ error and how do I fix it?
- 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?
- C ++ error: a expected initializer before [function name]
- terminate called after throwing an instance of ‘std::invalid_argument’ what(): stoi
- invalid new-expression of abstract class type
- 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
- error: redefinition of class
- Cleanest way to copy a constant size array in c++11
- Is there a tab equivalent of std::endl within the standard library?
- push_back vs emplace_back
- 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’
- What is move semantics?
- Eclipse C++ : “Program “g++” not found in PATH”
- 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?
- “g++” is not recognized as an internal or external command, MinGW
- Compiling a C++ program with gcc
- 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
- C++: std does not have member “string”
- 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
- C++ error: definition of implicitly-declared
- Call to implicitly deleted copy constructor in LLVM
- expected unqualified-id before string constant
- 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):
- Error: free(): invalid next size (fast):
- Does C++11 have C#-style properties?
- I get this error: “glibc detected”
- Update GCC on OSX
- G++ undefined reference to class::function
- Undefined reference to class constructor, including .cpp file fixes
- Iterator Loop vs index loop
- Error “Unterminated conditional directive” in cross-referencing headers
- 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?