|
|
|
|
|
by ar15saveslives
3360 days ago
|
|
Define "bastardizing C". Which improvement do you consider as "failed attempts"? RAII, constructors/destructors, so you don't need to write spaghetti code to free resources reliably? Templates, so you can write sort() function once, for all comparable types? Lambdas? Or maybe GLib is somehow better than stl/boost? C++ saves TONS of time and effort in our projects, thank god that I don't need to write in plain C anymore. |
|
C has a generic sort: qsort [1] (or mergesort, heapsort or radixsort if you have specific requirements).
[1] https://linux.die.net/man/3/qsort