Hello
When you use enum inside a class, how do you implement it?
Suppose you have:
or would you put enum state_type in a structure (for instance struct state) so you could write:Code:class someclass {
public:
enum state_type {
work = 1,
sleep
};
state_type m_state;
};
m_state = work;
which looks nicer if you ask me.Code:state::state_type somestate = state::work;
What do you think?
Thanks for answers!