problem comparing character
Code:
char *compareChar(char *sN, char *sC, char *rC){
int i,j;
int destination_len;
destination_len = strlen(rC);
for(i=0;i<destination_len;i++)
{
if(*rC == "o")
{
printf("%c \n",*rC);
}
rC++;
}
}
for the above function, i pass in "hello world" to the char *rC. I would like to know why does this warning occurs and also how can i solve this problem ??.
"warning C4047: '==' : 'int ' differs in levels of indirection from 'char [2]"
Re: problem comparing character
The above line should probably be
And use better formatting. Comments would help too