Location of library functions?

Hello,

I often find myself curious to see how many standard c++ functions are actually defined. I use Dev-C++, and by browsing the folders, I am obviously able to find the declarations of these functions in header files such as math.h, but where does one look for the actual function definitions? For example, say I wanted to look at how pow() does its calculation, or see how getline() does what it does, etc...
Last edited on
I was curious about the same thing.
You don't typically have the actual source code for them on your system. They are pre-compiled into the C:/MinGW/lib/ directory.

You can get the sources online, but often enough they are actually just assembly code wrapped in a C function block.

The actual code compiled into your program likely depends on whether or not you have MMX or SSE instructions on your FPU coprocessor. (In other words, pow() is done with special instructions on the coprocessor.)
Hi,
I can understand your curiosity;-).
But the implementation files are not availble to the user(I am speaking abt microsoft and the like companies where they work for money, and nothing comes free..). Only the libraries are provided along with the installation of those compilers. As source code we have only the interface(header).

You should probably search for open source s/w to get to knw the implementation of such functions...

@Others: Did I answer jrode and mikeb570 correct:? :-P

Regards,Vinod
Yes, for companies like Microsoft and Comeau and Sun Microsystems etc source code is proprietary --meaning we can't look at it.

Borland/CodeGear Turbo Explorer library sources are open, and come with the product.

GNU is by definition open.

Etc.
Topic archived. No new replies allowed.