std::vector< std::vector< int > > foo( 10, std::vector< int >( 10 ) );for( int j = 0; j < 10; j++ ) for( int k = 0; k < 10; k++ ) std::cout << foo[j][k] << std::endl;
The important thing to note is that operator[] returns a reference to that element. It appears that the compiler is smart enough to figure the rest out. The other option is this: foo[j].operator[](k) but that's just scary
Edited by - Kensai on September 19, 2000 11:08:09 PM