Export (0) Print
Expand All
Expand Minimize

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
};
Show:
© 2014 Microsoft