c++ - Why does a function with an input that has a reference to a pointer not compile? -
i've tested on linux box, has gcc, , compiles fine.
void myfunc(int* &input); that compiles no errors.
on avr, declaring same function:
void myfunc(int* &input); results in compilation error:
expected ';', ',' or ')' before '&' token gcc version on linux 4.6.3
gcc version avr (avr-gcc) 3.4.2
in c (not sure c++)
void myfunc(int* &input); is not valid declaration. in c, calls value. there no call reference unlike c++.
Comments
Post a Comment