Hi, I would have replied in the last thread instead of creating a new one again but I have a dial up connection and dad doesn't like me tying up the phone lines at this time in the year. In the last thread I asked how to find the cubed root of a variable and Narue gave me this segment of code (thanks for your help btw)
#include <cstdlib>
#include <cmath>
#include <iostream>
int main()
{
int val;
std::cout<<"Enter a number: ";
if ( std::cin>> val )
{
std::cout<<"Cube root of "<< val <<": "
<< std::pow ( std::abs ( val ), 1.0 / 3.0 ) <<std::endl;
}
return 0;
}
I tried compiling it and got two errors saying that pow and abs were not members of std, what should I use instead?
C:\Program Files\Microsoft Visual Studio\VC98\cube.cpp(14) : error C2039: 'pow' : is not a member of 'std'
C:\Program Files\Microsoft Visual Studio\VC98\cube.cpp(14) : error C2039: 'abs' : is not a member of 'std'
Error executing cl.exe.