Errors/warnings passing int/char arrays by reference
- by Ankur Banerjee
I'm working on a program where I try to pass parameters by reference. I'm trying to pass a 2D int array and a 1D char array by reference.
Function prototype:
void foo (int* (&a)[2][2], char* (&b)[4])
Function call:
foo (a, b);
However, when I compile the code with -ansi and -Wall flags on gcc, I get the following errors:
foo.c: At…