Compiler Error C2165

 

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 C2165.

keyword' : cannot modify pointers to data

The __stdcall, __cdecl, or __fastcall keyword attempts to modify a pointer to data.

The following sample generates C2165:

// C2165.cpp  
// compile with: /c  
char __cdecl *p;   // C2165  
char *p;   // OK  

Show: