Compiler Error C2655
'identifier' : definition or redeclaration illegal in current scope
An identifier can be redeclared only at global scope.
The following sample generates C2655:
// C2655.cpp
class A {};
class B {
public:
static int i;
};
int B::i; // OK
int main() {
A B::i; // C2655
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for