Well, it won't compile, but apart from that ...
If you correct it:
typedef enum {Fixed, Floating, Snap} CursorMode;
All it's doing is declaring an enum that (in both cases) has three possible values, and using
typedef
to give it a type name that can be used like
char
, or
int
.
typedef enum {Fixed, Floating, Snap} CursorMode;
...
CursorMode cm = Floating;
cout << cm;