fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector< vector<int> > b;
  9.  
  10. vector<int> temp;
  11.  
  12. temp.push_back(0);
  13. temp.push_back(1);
  14.  
  15. b.push_back(temp);
  16.  
  17. cout << "b[0][1] = " << b[0][1] << endl;
  18.  
  19. b[0][1] = 5;
  20.  
  21. cout << "b[0][1] = " << b[0][1] << endl;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 2860KB
stdin
Standard input is empty
stdout
b[0][1] = 1
b[0][1] = 5