fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main() {
  5.  
  6. std::vector<std::vector<int>> vec;
  7. for( int i=0;i<5;i++)
  8. vec.push_back(std::vector<int>(3));
  9. for(int i=0;i<vec.size();i++){
  10. for(int j=0;j<vec[i].size();j++){
  11. std::cout<<&vec[i][j]<<' ';
  12. }
  13. std::cout<<'\n';
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
0x880f008 0x880f00c 0x880f010 
0x880f028 0x880f02c 0x880f030 
0x880f018 0x880f01c 0x880f020 
0x880f090 0x880f094 0x880f098 
0x880f0a0 0x880f0a4 0x880f0a8