Search code examples
c++sortingc++11qsort

Should I use qsort over sort in C++?


I have browsed through most of the questions on the comparison between qsort vs sort in C++. I wanted to just ask if there were any cases where you would prefer qsort over sort?


Solution

  • Probably none, std::sort is type safe, plus it can inline the comparator function. The only distinctive strong point of qsort is that it's available in plain C.