You know the syntax for declaring a vector of int, a vector of vectors of int is only a small step.
The syntax for declaring a vector is
Code:
vector<data_type> vector_name;
So, in your case, you want a vector of vectors of int. So put vector<int> in for data_type, and we get
Code:
vector<vector<int> > vector_name;
In general, the rule on whitespace in your code is that it's ignored, that is:
Code:
cout << someVar;
cout<<someVar;
cout<< someVar;
cout
<<
someVar;
are all the same. In the above declaration, the space between the two greater-than signs is neccessary. The compiler will be confused thinking you're using the insertion operator. That doesn't sound so clear re-reading it, so as an example:
Code:
vector<vector<int> > vecName; //this is good
vector<vector<int>> vecName; //BAD swanley! NAUGHTY! {swats you on the nose with a newspaper}
As far as pushing elements onto the vectors and accessing elements in a vector of vectors, do some more research. Try to see if you can get it on your own, and if not, post what you've tried and why you think it's not working.