Using this member initialization...
StatsScreen::StatsScreen( GameState::State level )
: m_Level( level ) {
...//
}
I get the following warning...
extended initializer lists only available with -std=c++0x or -std=gnu++0x
Any information regarding this warning?
Edit: Warning went away after I removed one of the member that was assigned to a value inside the constructor (couldn't be done through member initialization) and made it a local variable instead of a class member. Still want to know what that warnings means though.
解决方案
I think 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