View Full Version : Where is the standard library in c++?

March 11th, 2009, 09:09 AM
It's very possibly that this has come up and that I'm just not sure how to search for it.

I have need to look up the standard implementation of something (quicksort, to be exact), but I have no idea where to look for it. I've found the headerfiles in usr/include, but that doesn't quite help me. I know it's in stdlib/cstdlib, but where is that file?

Thank you,

March 11th, 2009, 09:41 AM
on my machine,

locate cstdlib



March 11th, 2009, 10:00 AM
Well, that gave me header files, but still not the actual files, so I still haven't found the implementation.

Perhaps it's not in cstdlib, or the actual file is called something else?

March 11th, 2009, 12:55 PM
if you re seeking for the C++ implementation, its in the header file "algorithm". Since its an template, implementation has to be in the headers.

The C Version is somewhere in glibc (and only in compiled form unless you DL the sources). I had to dig it up for myself sometime for a presentation, so ill attach it

March 11th, 2009, 02:06 PM
Thanks. =) It was the c++ one I needed. We're supposed to compare that implementation with one we made ourselves.

March 11th, 2009, 02:58 PM
I'm not sure if it's what you're looking for, but you can use www.cppreference.com as a reference to the standard library. It's up to date and easy to read.

March 11th, 2009, 03:02 PM
That's going to be very useful, but didn't have the implementation I needed. Ah well, I've found some other references. Thank you =)