Compiler Error C2556
'identifier' : overloaded functions only differ by return type
The overloaded functions have different return types but the same parameter list. Each overloaded function must have a distinct formal parameter list.
The following sample generates C2556:
// C2556.cpp
// compile with: /c
class C {
int func();
double func(); // C2556
int func(int i); // ok parameter lists differ
};
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