Tech Off Post

Single Post Permalink

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

    Maybe I can go with something like this until C++ 0x is release and implemented in gcc and VC compiler ?

    class A
    {
    public:
        enum Value { None, Value1, Value2 };
    };

    class B
    {
    public:
        enum Value { None, SomeType1, SomeType2 };
    };

    int main()
    {
        A::Value a = A::None;
        B::Value b = B::None;
    }