#include <iostream>
#include <vector>
int main( void ) {
// 4x5 (4 in x, 5 in y) array, containing -1
std::vector< std::vector<int> > vvint( 5, std::vector<int>( 4, -1 ) );
for( int j=0; j<vvint.size(); j++ ) {
for ( int i=0; i<vvint.at(0).size(); i++ ) {
std::cout<< vvint[j][i] << " ";
}
std::cout<< "\n";
}
return 0;
}
Edit: Beaten to it. Forgot to post.
twomers
Posting Virtuoso
1,877 posts since May 2007
Reputation Points: 453
Solved Threads: 57
Skill Endorsements: 6
Question Answered as of 4 Years Ago by
Alex Edwards
and
twomers twomers
Posting Virtuoso
1,877 posts since May 2007
Reputation Points: 453
Solved Threads: 57
Skill Endorsements: 6