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
and
"[C++ Error] Modedit.cpp(33): E2277 Lvalue required" in C++ Builder 6
for this part of code
where TerrainType is enumerated typeCode: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.Code:enum TerrainType { Plains=0, Forest, Hills, Swamp, Water, Village };



LinkBack URL
About LinkBacks



And i wonder if i should use it or no in builder X nevertheless it's compiling and working correct.