B
bobl0456
I get the following error:
TurtleGraphics.cpp(93): error C2677: binary '!=' : no global operator found which takes type 'Cmds' (or there is no acceptable conversion)
for the following statement:
} while ( cmdsArray[cmdNo] != Cmds::END_OF_DATA ); // repeat until end of data reached
Cmds is defined as:
enum class Cmds { PEN_UP = 1, PEN_DWN, TURN_RIGHT, TURN_LEFT, MOVE, DISPLAY, END_OF_DATA = 9};
and cmdsArray is a pointer based array of type int.
I do not understand why this should not work. BTW, I know that if I change the enum back to traditional unscoped enum it will work fine.
Bob
TurtleGraphics.cpp(93): error C2677: binary '!=' : no global operator found which takes type 'Cmds' (or there is no acceptable conversion)
for the following statement:
} while ( cmdsArray[cmdNo] != Cmds::END_OF_DATA ); // repeat until end of data reached
Cmds is defined as:
enum class Cmds { PEN_UP = 1, PEN_DWN, TURN_RIGHT, TURN_LEFT, MOVE, DISPLAY, END_OF_DATA = 9};
and cmdsArray is a pointer based array of type int.
I do not understand why this should not work. BTW, I know that if I change the enum back to traditional unscoped enum it will work fine.
Bob