Correct Syntax for push_back with 2D vector

Hello,

I am sorry for the dumb question but what is the correct syntax for push_back with a 2D vector to an element for either dimensions. Thanks

vector< vector<int> > my2DVector

1
2
3
vector< vector<int> > my2DVector;
my2DVector.push_back( vector<int>() );
my2DVector[0].push_back( 5 );
Topic archived. No new replies allowed.