My program works perfectly (WOOHOO!!!!)
Just one little warning I'm getting:
Line 57:Code:countWords.c:57: warning: passing argument 4 of ‘qsort’ from incompatible pointer type
And my function:Code:qsort( hte_array, HT_getNrOfElements(), sizeof(HT_Element), compar_HTelements);
Why is the compiler giving a warning here? Why is it not valid?Code:int compar_HTelements(HT_Element *pa, HT_Element *pb) { if ( (*pb).count != (*pa).count ) return (*pb).count - (*pa).count; else return strcmp( (*pa).word, (*pb).word ); }
Thanks!
=D



LinkBack URL
About LinkBacks


