fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void show(int& tab[]) {
  5. for(auto x : tab) {
  6. std::cout << x << std::endl;
  7. }
  8. }
  9.  
  10. int main() {
  11. int tab[] = {1,2,3,4,5};
  12.  
  13. show(tab);
  14.  
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:20: error: declaration of 'tab' as array of references
 void show(int& tab[]) {
                    ^
prog.cpp: In function 'void show(...)':
prog.cpp:5:15: error: 'tab' was not declared in this scope
  for(auto x : tab) {
               ^
stdout
Standard output is empty