Compiler Error C3254
'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()
{
}