当我编译这段代码
QVector<QString> taskTitle({"Movies which are directed by Steven Spilberg",
"All those who have reviewed Gone whith the wind",
"Summation of Gone with the wind scores",
"All years which has a movie whith 5 or 4 scores increasingly sortd"});
编译器给了我:
error: no matching function for call to
'QVector<QString>::QVector(<brace-enclosed initializer list>)'
我也用过:
QVector<QString> taskTitle={"Movies which are directed by Steven Spilberg",
"All those who have reviewed Gone whith the wind",
"Summation of Gone with the wind scores",
"All years which has a movie whith 5 or 4 scores increasingly sortd"};
然后再次:
error: in C++98 'taskTitle' must be initialized by constructor, not by '{...}'
我的编译器是 MinGW 并附带 QT 5.0.1 我能做什么?