Thursday, 29 September 2011

Solution : warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x

you are initializing the object with {...} instead of (...):

StatsScreen ss{...}; // only available in C++0x
StatsScreen ss(...); // OK in C++98

To compile your code as C++0x code, just add the following flag when compiling:

g++ test.cpp -std=c++0x

No comments:

Post a Comment