Why not use the first ENUM set for the second selection also ?
Either that or prefix the ENUM names with an abbreviation of their purpose. Something like:
enum MenuOne { MO_FIRST = 1, MO_SECOND } ;
enum MenuTwo { MT_FIRST = 1, MT_SECOND } ;
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 733
As long as both enums are NOT used within same switch-case there are no issues at all..
If you wish to use them in same switch-case you'll get the err that case value is repeated. So all you gotta do is decide on 2 ranges for both your enums and change the first value in enum declaration appropriately.
E.g.
const ENUM_ONE_START = 0 ;
const ENUM_TWO_START = ENUM_ONE_START + 100 ;
enum MenuOptionInitial { TEST_ONE = ENUM_ONE_START, TEST_TWO, TEST_THREE};
enum MenuSecond { TEST2_ONE = ENUM_TWO_START, TEST2_TWO, TEST2_THREE};
thekashyap
Practically a Posting Shark
811 posts since Feb 2007
Reputation Points: 254
Solved Threads: 75