0

Hi, How to explore libraries, by that i mean open and look at its source code? I am using Embarcadero RAD Studio 2010.

For example i want to see functions inside #include <list>.

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by firstPerson
0

You can try and see if there the source code is given to you with the compiler CDs.
Or maybe in the src directory of the installation.

However, I highly doubt it is necessary for you to look in to the source code.
Just knowing how to use the functions will be enough.
The whole purpose of these libraries is to make your development process faster and reliable. It is not usually expected from you to know how they are built or to make them efficient.

0

If you want to see the source code for std templates such as list then just look at the header file. But be prepared for some pretty awful looking code :) The ones from Microsoft are nearly unreadable, at least it is for me.

0

Try this, write std::list<int> a, into your compiler, and right click it. See if there
is an option that lets you "see deceleration or initialization".

I doubt that you will find the code. Most of them are written into a dll, and
the libraries aren't very easy to read. So if you want to look into the source code
of std::list, then I suggest a different route, that is, go online and read theory
about singleLinkedList and doubleLinkedList, and then try to write one yourself.
And when you do succeed, you will have a good idea on how std::list was implemented.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.