我正在尝试用一些数组填充向量。这段代码有什么问题?
#include <vector>
#include <array>
using namespace std;
int main(){
double p[10]{1,2,3,4,5,6,7,8,9,10};
vector<double[10]> p_prev;
p_prev.push_back(p);
return 0;
}
我正在用g++
-std=c++11
.
error: request for member '~ double[10]' in '* __p', which is of non-class type 'double[10]'
我该如何正确推动它?