Enum values doubts?
- by maddy
Hi all,
Is there any possible way to do any arithmetic operations on enum values
enum Type{Zero=0,One,Two,Three,Four,Five,Six,Seven,Eight,Nine};
main()
{
enum Type Var = Zero;
for(int i=0;i<10;i++)
{
switch(Var)
{
case Zero:
/*do something*/
case One:
/*Do something*/
.....
}
Var++;(I know that this increment is not possible,But is there anyway by which we can have this variable named Var increment.
regards
maddy