I have a function that I declared like this in the header file:
and the compiler gives me error C2572 ("Redefinition of default parameter"
on this line in the header file, not the C++ source file. However, when I change the line to
I get errors in other files that say "Error: 'func' does not take 1 parameter(s)".
What's going on?
Code:
CString func(const SomeClass &x, bool y=true);
and the compiler gives me error C2572 ("Redefinition of default parameter"
Code:
CString func(const SomeClass &x, bool y);
I get errors in other files that say "Error: 'func' does not take 1 parameter(s)".
What's going on?