Question
compare two char arrays
Hi there
I am trying to compare two char arrays. one is
char CODENUMBER[36]="06A9062F0020063406450627063106470200";and the other one is a 250 element array called
char Rcv[250]in my code, I receive messages and I fill Rcv[]'s elements with those messages. I want to check if I could get that CODENUMBER[] array in Rcv[]. so I wrote
int i=0,c=0;
for(int j=0;j<250;j++){ //Check if CODENUMBER is sent correctly
while(strcmp(Rcv[j],CODENUMBER[i])==0 && i<36){
i++;
c++;
if(c==36){
//do something
i=0;
c=0;
}
}
}but I get this error
INCOMPATIBLE INTEGER TO POINTER CONVERSION PASSING 'CHAR' TO PARAMETER OF TYPE 'CONST CHAR *';TAKE THE ADDRESS WITH &
why do I get this message?
