我具有此功能:
int readFile(char first_filename[] , char second_filename[]){
char **first_array=NULL;
char **second_array=NULL;
...
printResults(first_array ,second_array ,small);
...
}
void printResults(const char ** first_array ,const char ** second_array ,const int small){
for(int i=0; i<small; i++){
if(strcmp(first_array[i],second_array[i])!=0){
printf("%d: %s", (i+1) , first_array[i]);
printf("%d: %s", (i+1) , second_array[i]);
}
else
`printf`("line %d are not equal\n", i+1);
}
}
当我运行程序时,将显示以下2条警告:
警告:从不兼容的指针类型[-Wincompatible-pointer-types] printResults(first_array,second_array,small);
警告:从不兼容的指针类型[-Wincompatible-pointer-types] printResults(first_array,second_array,small);
有人可以帮我吗?