Export (0) Print
Expand All
Expand Minimize

Compiler Error C2761

'function' : member function redeclaration not allowed

You cannot redeclare a member function. You can define it, but not redeclare it.

The following sample generates C2761:

// C2761.cpp
class a
{
   int t;
   void test();
};

void a::a;     // C2761
void a::test;  // C2761

int main()
{
}
Show:
© 2014 Microsoft