Compiler Error C2645

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C2645 on docs.microsoft.com. no qualified name for pointer to member (found ':: *')

The declaration of a pointer to a member does not specify a class.

The following sample generates C2645:

// C2645.cpp  
class A {};  
int main() {  
   int B::* bp;   // C2645 B not defined  
   int A::* ap;   // OK  
}  

Show: