diff --git a/cv2/program.c b/cv2/program.c index 1481b31..d57ad33 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -14,6 +14,7 @@ struct jedlo { }; int compare(const void* p1,const void*p2); +int abeceda(const void* p1, const void* p2); int main() { @@ -44,6 +45,7 @@ int main() { } counter2 = (counter2 / 2); + qsort(databaza, counter2,sizeof(struct jedlo),abeceda); qsort(databaza, counter2,sizeof(struct jedlo),compare); for(int z=0; zname, s2->name); + return result; } \ No newline at end of file