Compiler Error C2159

 

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

more than one storage class specified

A declaration contains more than one storage class.

The following sample generates C2159:

// C2159.cpp  
// compile with: /c  
static int i;   // OK  
extern static int i;   // C2159  

Show: