找到你要的答案

Q:3D STL Vector in VC++ 2015 vs VC++2008

Q:三维STL向量在VC++ 2015和VC + + 2008

I migrate project C++ in VS 2008 to 2015, and it have some problem in 3D STL vector like this:

int a; 
int b; 
vector<vector<vector<int> > > vec(a,b) ///this line in VC2008 run OK but error occur in VC2015 say error (No initialization constructor found)

my solution for this is:

int a;
int b;
vector<vector<int> > vecb(b);
vector<vector<vector<int> > > vec(a,vecb);

Is my solution right?

我迁移项目C++在VS 2008中2015,并有一些问题在三维STL这样:

int a; 
int b; 
vector<vector<vector<int> > > vec(a,b) ///this line in VC2008 run OK but error occur in VC2015 say error (No initialization constructor found)

我的解决办法是:

int a;
int b;
vector<vector<int> > vecb(b);
vector<vector<vector<int> > > vec(a,vecb);

我的解决方案对吗?

c++  vector  stl