A common practice is to have hte enums as follows:
{A,
B,
C,
MIN= A,
MAX = C
}
Then make your array size MAX.
TYhen if the enum list ever changes ... you can reassign MAX as desired and all your code should still work. Imagine if you used C in 100 places then decided C nees to be deleted
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.