A class does not define a namespace, and therefore "using" isn't applicable here.
Also, you need to make the enum public.
If you're trying to use the enum within the same class, here's an example:
class Sample {
public:
enum Colour { RED, BLUE, GREEN };
void foo();
}
void Sample::foo() {
Colour foo = RED;
}
And to access it from outside the class:
void bar() {
Sample::Colour colour = Sample::RED;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…