Compiler Error C3277
cannot define an unmanaged enum 'enum' inside managed 'type'
An enumeration was defined incorrectly inside a managed type.
The following sample generates C3277:
// C3277a.cpp
// compile with: /clr
ref class A
{
enum E {e1,e2}; // C3277
// try the following line instead
// enum class E {e1,e2};
};
int main()
{
}
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