Compiler Error C3116

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3116.

storage specifier' : invalid storage class for interface method

You used typedef, register, or static as the storage class for an interface method. These storage classes are not permitted on interface members.

The following sample generates C3116:

// C3116.cpp  
__interface ImyInterface  
{  
   static void myFunc();   // C3116  
};  

Show: