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
You have a vector of vectors.
normal[i] Does not exist because you have not created it.
std::vector > normal:
for(i=0;i<10;i++){
normal.emplace_back();
for(j=0;j<20;j++){
normal.back().push_back(j);
}
}
for(i=0;i<10;i++){
for(j=0;j<20;j++){
std::cout << normal[i][j] << " ";
}
std::cout << std::endl;
}