Edit

Share via


Compiler Error C2794

'function' : is not a member of any direct or indirect base class of 'class'

You tried to use super to call a nonexistent member function.

The following sample generates C2794

// C2794.cpp
struct B {
   void mf();
};

struct D : B {
   void mf() {
      __super::f();  // C2794
   }
};