How come this code doesnt compile?
class A
{
class B
{
public enum Enum <-- this line
{
AD,
BC
}
}
}
Compiler reports:
enum declarations allowed only in static contexts.
But then when I put the Enum inside class A, everything is okay.
This is quite surprising. I dont think I have this problem in C++.