I have a vector and want to store int data in to it at run time can I store the data in a 2D vector in this manner ?
std::vector> n
Yes, but you also need to push each of the sub-vectors:
std::vector> normal; for(int i=0; i<10; i++) { normal.push_back(std::vector()); for(int j=0; j<20; j++) { normal[i].push_back(j); } }