Compiler Error C2572
'class::member' : redefinition of default parameter : parameter param
Default parameters cannot be redefined. If you require another value for the parameter, the default parameter should be left undefined.
The following sample generates C2572:
// C2572.cpp
// compile with: /c
void f(int i = 1); // function declaration
// function definition
void f(int i = 1) {} // C2572
// try the following line instead
// void f(int i) {}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for