I am very new to vectors and would like know how assignment works in case of a vector of vectors [2-D Vector].
I want to input a list of elements(from stdin) to the first row of the vector of vectors. How should I go about it?
I tried to assign it as-
v.push_back( std::vector<int>() );
constint N = 10;
v.reserve( N );
for ( int i = 0; i < N; i++ )
std::cout << "Enter a number: ";
std::cin >> x;
v.push_back( x );