qsort
doesn't take a Vector<T>*
. It takes a pointer to the first element of the vector.
getNrMed
is not a method of Vector<T>
, it's a method of MedRepository
which is seen nowhere else in this snippet.
The fact that you need to put a cast on compareNA
is the sign of a serious problem. It's almost never safe to cast a function pointer. You need to make it compile without a cast.
Undoubtedly, given the code quality here, there are additional issues--this is just what can be diagnosed given the limited amount of code you presented.