qsort how :(

I know in iostream there is a qsort but what arguments do I put in
qsort()
You mean this one: http://www.cplusplus.com/reference/algorithm/sort.html
...Or this one: http://www.cplusplus.com/reference/clibrary/cstdlib/qsort.html

The first one takes an iterator to the beginning of an object, an iterator to the end, and an optional pointer to a comparison function or an object with a comparison function.

The second one takes a pointer to an array, an array size, a data size, and a pointer to a comparison function.


Hmm... The first time I saw a use of qsort() I was confused out of my mind.
Last edited on
Hi frnd
U have given example of qsort() which is used for integer array ,if i have lots of string name then how we use qsort plz tell me witha example if possible.
Thanx
Topic archived. No new replies allowed.