且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

GCC编译器警告:扩展初始化程序列表仅在c ++ 0x中可用

更新时间: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