fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main() {
  5. std::vector<std::vector<int>> arr = {{100, 120, 200}, {110, 140, 300}, {130, 170, 400}};
  6. arr[1][1] = 0;
  7. for(const auto& row: arr) {
  8. for(const auto& elem: row)
  9. std::cout << elem << " ";
  10. std::cout << std::endl;
  11. }
  12. }
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
100 120 200 
110 0 300 
130 170 400