fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int array[][2] = { 1, 2, 3, 4,
  6. 5, 6, 7, 8 };
  7.  
  8. for(auto& j : array)
  9. {
  10. for(auto& i : j)
  11. {
  12. std::cout << i << '\n';
  13. }
  14. }
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6
7
8