我试图做到以下几点:将静态数组推入std :: vector?
我:
std::vector<std::vector<GLdouble[2]>> ThreadPts(4);
然后我尝试这样做:
GLdouble tmp[2];
while(step--)
{
fx += dfx;
fy += dfy;
dfx += ddfx;
dfy += ddfy;
ddfx += dddfx;
ddfy += dddfy;
tmp[0] = fx;
tmp[1] = fy;
ThreadPts[currentvector].push_back(tmp);
}
但是编译器说:
错误15错误C2440:'初始化':无法从'const GLdouble [2]'转换为'double [2]'C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ include \ vector 1211
那我该怎么做呢? 我使用的是VS 2008,并且没有std :: array,我没有提升。
由于
你应该考虑咨询您的C++的书;如果你还没有一个,你应该考虑从[The Definitive C++ Book Guide and List]中获取一个(http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list )。 – 2010-07-07 03:00:50