Export (0) Print
Expand All
Expand Minimize

Compiler Error C2370

Error Message

'identifier' : redefinition; different storage class

The identifier is already declared with a different storage class.

Example

The following sample generates C2370:

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

The following sample generates C2370:

// C2370b.cpp
#define Thread __declspec( thread )
extern int tls_i;
int Thread tls_i;   // C2370 declaration and the definition differ
int tls_i;   // OK

Community Additions

ADD
Show:
© 2015 Microsoft