Export (0) Print
Expand All
Expand Minimize

Compiler Error C3241

Error Message

'method' : this method was not introduced by 'interface'

When you explicitly override a function, the function signature must exactly match the declaration for the function that you are overriding.

The following sample generates C3241:

// C3241.cpp
#pragma warning(disable:4199)

__interface IX12A {
   void mf();
};

__interface IX12B {
   void mf(int);
};

class CX12 : public IX12A, public IX12B { // C3241
   void IX12A::mf(int);
};

Community Additions

ADD
Show:
© 2014 Microsoft