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 could/should typedef the struct so that you don't need the struct keyword every time you will declare a variable of that type.
typedef struct _KEY_STATE
{
bool kSHIFT; //if the shift key is pressed
bool kCAPSLOCK; //if the caps lock key is pressed down
bool kCTRL; //if the control key is pressed down
bool kALT; //if the alt key is pressed down
} KEY_STATE;
Now you can do:
KEY_STATE kState;
or (as in the example you have) :
struct KEY_STATE kState;