You can supply parameter names in a function declaration, but the compiler
ignores them except in the following two situations:
In the following example, the third parameter name intersects is meant to have enumeration type subway_line, but this name is hidden by the name of the first parameter. The declaration of the function subway() causes a compile-time error because subway_line is not a valid type name because the first parameter name subway_line hides the namespace scope enum type and cannot be used again in the second parameter.
enum subway_line {yonge, university, spadina, bloor}; int subway(char * subway_line, int stations, subway_line intersects);
Related References