I see the point. Thats true. But still i've tried that in borland C++ builder X and when i tried to enumerat lik this
i've got error but not in enumeration but in loops using it.
Forest = 0,
Hills = -42,
Swamp = 666,
Water = 8,
Village = 1000
and i've tried
than it's perfectly compiling it just like puting them in rising order according to value and than make correct step. Maybe builder X have some modified iostream library with overloaded ++ operator.
red = 1,
blue = 2,
green = 4,
In any case thanks for help.no i see why it didn't work in VS and builder 6. And it sounds resonable And i wonder if i should use it or no in builder X nevertheless it's compiling and working correct.
p.s. I've also found a book in which i saw it. It's "C++ Pocket Refrence" published by O'Reilly.
there is such code sample:
for (SpectrumColor s=Red;s<=Violet;s++)