C++: declaring enumerator within class from outside so can be used in private members


    class Printer;
    enum Printer::States;
    class Printer {                  // choose one of monitor or cormonitor
    	States taskStates[];
      public:
        enum States { Starting = 'S', Blocked = 'B', Unblocked = 'U', Finished = 'F', // general
              Napping = 'N', Awake = 'A',             // Santa
              Working = 'W', NeedHelp = 'H',          // elf
              OnVacation = 'V', CheckingIn = 'I',     // reindeer
              DeliveringToys = 'D', DoneDelivering = 'd', // Santa, reindeer
              Consulting = 'C', DoneConsulting = 'c' // Santa, elves
        };
        Printer();
        void print( unsigned int id, States state );
        void print( unsigned int id, States state, unsigned int numBlocked );
    };
C++: declaring enumerator within class from outside so can be used in private members
===



    class Printer;
    enum Printer::States;
    class Printer {                  // choose one of monitor or cormonitor
    	States taskStates[];
      public:
        enum States { Starting = 'S', Blocked = 'B', Unblocked = 'U', Finished = 'F', // general
              Napping = 'N', Awake = 'A',             // Santa
              Working = 'W', NeedHelp = 'H',          // elf
              OnVacation = 'V', CheckingIn = 'I',     // reindeer
              DeliveringToys = 'D', DoneDelivering = 'd', // Santa, reindeer
              Consulting = 'C', DoneConsulting = 'c' // Santa, elves
        };
        Printer();
        void print( unsigned int id, States state );
        void print( unsigned int id, States state, unsigned int numBlocked );
    };