下面的代码给出“未找到”输出。但我希望它能给“找到”。我的错误在哪里?
#include <stdio.h>
void compare(char *x, char *face);
int i;
int main(void){
char array[5]="Two";
char *numbers[4]={"One", "Two", "Three", "Four"};
compare(array, *numbers);
}
void compare(char *x, char *y){
for (i = 0; i < 4; i++)
{
if (*x==y[i])
{
printf("\n found");
return;
}
}
printf("\n not found\n");
}