0

このコードをコンパイルすると

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 に付属しています。どうすればよいですか?

4

1 に答える 1