vector<vector<int> > mymatrix;
vector<int> *ptr_vec;
How do I make the ptr_vec point to the vectors which are inside mymatrix one after another. In more details Let’s say mymatrix.at(0).size() gives 10, and mymatrix.at(1).size() gives 14 ..if I go ptr_vec->at(15) it should give me the fifth member in mymatrix.at(1) hope it doesn’t confuse anybody.
ok now that I showed the point , think of mymatrix as separated vectors like this
vector<int> row1, row2, row3; which might be simpler still how to make that ptr have all the addresses of what ever other vectors??
Given your clarification “how to make that ptr have all the addresses of what ever other vectors” I think you placed the
*incorrectly in your declaration.It think you meant
ptr_vecto be a vector of pointers.If so, …
Cheers & hth.,
– Alf