Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C3668
Collapse the table of content
Expand the table of content

Compiler Error C3668

'method' : method with override specifier 'override' did not override any base class methods

A function attempted to override a non-existent function.

For more information, see Explicit Overrides.

The following sample generates C3668.

// C3668.cpp
// compile with: /c
__interface I {
   void f(int);   // virtual by default
};

class J {
public:
   void g(int);
   virtual void h(int);
};

struct R : I,J {
   virtual void f() override {}   // C3668
   virtual void f(int) override {}   // OK

   virtual void g(int) override {}   // C3668
   virtual void h(int) override {}   // OK
};
Show:
© 2015 Microsoft