I have a program. Here is the code that is giving me a warning:
On the lines with the '*' I am getting a warning that says :Code:void Sensor::SetSensorState(char *cState) { char On[] = "On"; char Off[] = "Off"; if(!strcmp(cState, On)); strncpy(State, cState, 50);* if(!strcmp(cState, Off)); strncpy(State, cState, 50);* }
warning C4390: ';' : empty controlled statement found; is this the intent?
as I said this is a warning, not an error, so my program compiles and runs (up to this point).
what should I change about the code above?
[edit]
nevermind....duh...that was a lame mistake...