0

i want to know what is the code written in header files.(how a functions works)
is that possible

for e.g.
i created my own version of sqrt function in .C
now i want to know the difference b/w my code and sqrt function code.
i want to check how efficiently i created it.

thnks

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

you can always look for your header files in your library folders. Look for the address in the "Options" or "Preferences" of your c++ compiler, or go to the folder you configured when setting it up.

Once you reached the folder, look for the library you intend to study. That should do it

1

i want to know what is the code written in header files.(how a functions works)
is that possible

for e.g.
i created my own version of sqrt function in .C
now i want to know the difference b/w my code and sqrt function code.
i want to check how efficiently i created it.

thnks

You don't need sqrt source to compare your own implementation efficiency. Just run math.h sqrt in a loop - record total calculation time.
do the same thing with your sqrt - then compare execution times. Of course all conditions should be equal, that is - run experiment on same argument values and etc. Also you can compare calculation precision.

This question has already been answered. 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.