0
我試圖在QVector
中保存多項式係數。我的多項式的階數是2,所以它有三個數字。C++中的數組向量Q
當我定義QVector<double[3]> zeros_Real(n + 1)
時出現錯誤(如下)。首先,我想我可以使用QVector<QVector<double>>
,但它會成爲速度和內存問題,所以我決定不這樣做。
爲什麼我不能有QVector
的double[3]
元素?
錯誤:
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make: *** [debug] Error 2
21:27:01: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project untitled11 (kit: Desktop Qt 5.5.1 MinGW 32bit)
When executing step "Make"
你的答案很棒,但我不能調用數組或std :: array,我使用命名空間std定義了數組,並且已經包含數組庫。 – massaimara98
什麼是錯誤?你是否將它編譯爲C++ 11或更高版本? – LogicStuff
沒有任何錯誤,只是我不能打電話,我的意思不是來自CTRL +空間。我使用Qt Creater 3.5.1和Qt版本5.5.1,我不知道哪個C++版本的編譯器是? – massaimara98