I found a piece of code in "The C programming language second edition ANSI C" which does not compile. Someone on this forum is bound to have it so i thought i'd post this question. It's on page 40 at the bottom. For the one's who don't have it:
error C2055: expected formal parameter list, not a type list
It wants the name of a local variable, not just char[]. Am i missing something? Or is the book wrong.. which i doubt.
As expected, my compiler complains:The const declaration can also be used with array arguments, to indicate that the function does not change that array:
int strlen(const char[]);
The result is implementation-defined if an attempt is made to change a const.
error C2055: expected formal parameter list, not a type list
It wants the name of a local variable, not just char[]. Am i missing something? Or is the book wrong.. which i doubt.