Hi I have files called MyCode.h and MyCode.cpp
In MyCode.h I have declared
enum MyEnum {Something = 0, SomethingElse = 1};
class MyClass {
MyEnum e
The syntax MyEnum::SomethingElse is a Microsoft extension. It happens to be one I like, but it's not Standard C++. enum values are added to the surrounding namespace:
// header
enum MyEnum {Something = 0, SomethingElse = 1};
class MyClass {
MyEnum enumInstance;
void Foo();
}
// implementation
#include "MyClass.h"
void Foo() {
enumInstance = SomethingElse;
}