更新时间:2023-11-11 18:31:04
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