Re: problem with 2D vector
Quote:
Originally Posted by
msoh
i want to create a global 2D matrix and here is the code is use:
i am doing something wrong but i have no idea how to correct my mistake.
So what goes wrong?
Re: problem with 2D vector
Use { for .. for statements .. prob will be solved ..
Re: problem with 2D vector
How does that code compile ?
Code:
vector<vector<int> >mat; // 2D matrix
// ...
mat.resize(size_x, vector<string>(size_y)); //resize 2D matrix
Re: problem with 2D vector
Thanks all very much for the replies. I edited the first post.
Re: problem with 2D vector
Quote:
Originally Posted by
msoh
Thanks all very much for the replies. I edited the first post.
sorry but how can i edit my first post to correct my mistake. if this is not possible then the change i would do is what Philip Nicoletti wrote. Thanks again for the replies everyone.