• ### Popular Now

• 13
• 15
• 27
• 9
• 9

#### Archived

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

# call me dumb...

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

## Recommended Posts

but what is the include file to use sqr()? i have never used C++ before, i can''t find it anywhere

##### Share on other sites
I''m not positive but I would think

#include <math.h>

Good luck!

------------------------------
Have a r0xx0r 1337 day plx!

##### Share on other sites
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 on other sites
...and if you are using C++, include

  <cmath>

[edited by - Sheep on July 24, 2002 1:05:07 PM]

##### 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 on other sites
Hi Dumb, call me BeerNutts.

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

##### 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!