Hello,

Where can I find the source code/implementations of STL library? Thanks.

You already have it!!

If you are using linux and you have development environment setup then you will find it in the :
/usr/include/c++

In windows I dont know exact location, but you should still able to browse it from any IDE.
Just include the header file and click on it, it should take you to the library file.

The STL stands for Standard Template Library. Like any other template library, it is a header-only library (except for some low-level things, maybe). You already have the source if you have the headers, just look for them. Under linux, they will be either in /usr/include/c++ or /usr/local/include/c++. Under windows, it will depend on your compiler's installation, should not be very hard to find (make a file-search for any one of the STL header files).

Otherwise, you can get the STL source from SGI (original developer of STL).
Or, you can get GCC's implementation of the standard libraries as part of the source distribution of GCC.

Edited 5 Years Ago by mike_2000_17: n/a

Good luck reading those header files :) I tried once to read MS-Windows implementation of iostream and gave up because it was so complicated.

iostream would be definitely tough one to start with.
I would suggest to see some easier(!) one first.
Like list, string, vector. I think if you can understand these three, would cover lots of basic and advanced c++ concepts.
Then the Algorithms.
Best of luck. :)

Edited 5 Years Ago by alwaysLearning0: n/a

This article has been dead for over six months. Start a new discussion instead.