Tech Off Post

Single Post Permalink

View Thread: Enum C# vs C++
  • User profile image
    RichardRudek

    OR, you could try using namespaces:

    namespace A {
    	enum AA{ None, Value1, Value2 };
    }
    
    namespace B {
    	enum BB { None, Sometype1, Sometype2 };
    }
    
    ...
    ...
    	int a   = A::None;
    	int aa  = A::AA::None;
    	int b   = B::None;
    	int bb  = B::BB::None;
    
    EDIT: added some namespace/name permutations. PS: I don't think I like this new editor...