<du*********@gm ail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
hello,
can someone tell me
what is the difference between sort() (in stl) & qsort(stdlib.h)
The essential differences:
std::sort uses iterators (which include pointers),
whereas qsort uses pointers.
std::sort has a default comparison operator (< operator),
whereas qsort requires a user-supplied comparison function.
std::sort can be used to sort standard containers (except
std::list, which has its own member sort function) or arrays,
qsort cannot sort standard containers, but only arrays.
-Mike