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>.

Recommended Answers

All 3 Replies

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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.