Saturday, May 22, 2010

#include<cmath> needed for the sqrt function?

I have a C++ program due next thursday in one of my classes. I wrote the program in Quincy on my home computer and it ran fine. I tried to run it on a school computer in Visual C++ 6.0 and it gave me an error on the sqrt function. I will not be able to use the computers at school again until tuesday and I want to know if my program will work there. So my question is.... Do I have to include %26lt;cmath%26gt; to run the sqrt function in Visual C++ 6.0 even though I didn't have to in Quincy or is there something else wrong?

#include%26lt;cmath%26gt; needed for the sqrt function?
#include %26lt;cmath%26gt; or #include %26lt;math.h%26gt; either should work. Also if you want to test visual C++ at home try the express edition, it's free http://www.microsoft.com/express/vc/
Reply:#include %26lt;math.h%26gt;


No comments:

Post a Comment