Compiler Error C2794


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at 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