Compiler Error C2673

 

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

For the latest documentation on Visual Studio 2017, see Compiler Error C2673 on docs.microsoft.com. 'function' : global functions do not have 'this' pointers

A global function tried to access this.

The following sample generates C2673:

// C2673.cpp  
int main() {  
   this = 0;   // C2673  
}  

Show: