I have an unsigned char Hands[] which sometimes contains the letter 'Q' I want to do a check and if it contains 'Q' then print 'Qu' else print whatever is in Hands - But my code below doesn't work.
I also tried if (Hands=="q'){etc} - which didn't work either. I'm sure it must be something so simple that I'm doing wrong
Code: Select all
for( i = 13 ; i < n ; i++ ) {
test = strcmp(Hands[i],'q');
if (test = 0){printf("qu");}
else{printf("%c ", Hands[i]);}
}