I am trying to convert a C++ struct to C but keep getting "undeclared identifier"? Does C++ have a different syntax for referring to structs?
struc
You need to refer to KEY_STATE with struct KEY_STATE. In C++ you can leave the struct out, but not in plain C.
KEY_STATE
struct KEY_STATE
struct
Another solution is to do a type alias:
typedef struct KEY_STATE KEY_STATE
Now KEY_STATE means the same thing as struct KEY_STATE