fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int array[][] = { 1, 2, 3, 4,
  6. 5, 6, 7, 8
  7. };
  8.  
  9. for(auto& j : array)
  10. {
  11. for(auto& i : j)
  12. {
  13. std::cout << i << '\n';
  14. }
  15. }
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:14: error: declaration of ‘array’ as multidimensional array must have bounds for all dimensions except the first
  int array[][] = { 1, 2, 3, 4,
              ^
prog.cpp:9:16: error: ‘array’ was not declared in this scope
  for(auto& j : array)
                ^
prog.cpp:11:17: error: unable to deduce ‘auto&&’ from ‘j’
   for(auto& i : j)
                 ^
stdout
Standard output is empty