passing argument 4 of 'qsort' from incompatible pointer type
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having some trouble with a function we are supposed to be writing. Supposedly, this is how it should work, but it's giving me the incompatible pointer type error and I'm not sure how to fix it. The issue is in the qsort referencing the compare_last function. #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX_PERSONS 100 //person structure definition goes here typedef struct{ char last[32]; char first[32]; int year; }Person; //function declarations go here int compare_last(Person * ptr1, Person * ptr2); void main(void)