Archived

This topic is now archived and is closed to further replies.

call me dumb...

This topic is 5625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am pretty sure you mean the sqrt() function which is in math.h... if you want to calculate a power you should use the double pow(double x, double y) function, which is also in math.h... however if you want a sqr() function (That calculates a square) you had better write a function of your own (since I am not completely sure wheter C has it)... something like inline double sqr(double x) { return x * x; }

and if you really do not know what the #include stands for: READ A C TUTORIAL!!!



ICQ: 130925152
Email: e.j.folkertsma@student.utwente.nl

Share this post


Link to post
Share on other sites
umm yeah, i need to learn to use the search button BEFORE posting, sorry for the trouble. i was including the right header, i was thinking it was sqr instead of sqrt.

Share this post


Link to post
Share on other sites
quote:
Original post by BeerNutts
Hi Dumb, call me BeerNutts.

BWHAHAHA, that was a KNEE slapper (sorry guys, I had to


darn, you beat me to it!

Share this post


Link to post
Share on other sites