enumerated type and lvalue missing
I've writen some program in borland C++ builder X the want to compile it in builder 6 and VS C++ 2005 and i've got such problem in both compilers i get such error
"error C2676: binary '++' : 'TerrainType' does not define this operator or a conversion to a type acceptable to the predefined operator" in VS
"[C++ Error] Modedit.cpp(33): E2277 Lvalue required" in C++ Builder 6
for this part of code
where TerrainType is enumerated type
for (TerrainType terrain=Plains;terrain<=Village;terrain++)
so how to make this loop work properly i've tried "+1" instead of "++" but then VS still shows errors and Builder compiles but program starts an infinit loop.