This documentation is archived and is not being maintained.

Compiler Error C2655

'identifier' : definition or redeclaration illegal in current scope

An identifier can be redeclared only at global scope.

Example

// C2655.cpp
class A {};
class B
{
public:
   static int i;
};
int main()
{
   A B::i;  // C2655
}
Show: