#include <iostream> using namespace std; void show(int& tab[]) { for(auto x : tab) { std::cout << x << std::endl; } } int main() { int tab[] = {1,2,3,4,5}; show(tab); return 0; }
Standard input is empty
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) {
^
Standard output is empty