Reputation: 481
In my c++ code I'm using the auto
type, to enable c++11, I add the flag --std=c++0x
to my makefile, but I still get error of ISO C++ forbids declaration of .. with no type
, if I enable c++11 with -std=gnu++11
or -std=c++11
, I got cc1plus: error: unrecognized command line option "..."
, my gcc version is 4.3.4
, how should I solve this? Thank you.
Without enabling c++11, I got error of ISO C++ forbids declaration of wallclock with no type
the following line:
auto wallclock = time(nullptr);
Upvotes: 3
Views: 1726
Reputation: 22099
Support for auto
-typed variables was not implemented in GCC before version 4.4. The version you are using is too old.
See support matrix: https://gcc.gnu.org/projects/cxx0x.html
Upvotes: 5