Compiler Error C3254
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Compiler Error C3254

Error Message

'explicit override' : class contains explicit override 'override' but does not derive from an interface that contains the function declaration

When you explicitly override a method, the class that contains the override must derive, directly or indirectly, from the type that contains the function you are overriding.

The following sample generates C3254:

// C3254.cpp
__interface I
{
   void f();
};

__interface I1 : I
{
};

struct A /* : I1 */
{
   void I1::f()
   {   // C3254, uncomment : I1 to resolve this C3254
   }
};

int main()
{
}
Show:
© 2016 Microsoft