Hey all I have a bit of a problem, I need a little help fixing this little error problem. The Error is "error C2668: 'sqrt' : ambiguous call to overloaded function" it is on this line of code:
void myint::square()
{
// Output square root
cout << "The square root of " << num << " is " << sqrt(num) << endl;
}
sqrt() requires a double, float, or long double as a parameter. Judging by your variable name, you're attempting to pass an int to sqrt(). Try using static_cast to convert it to a double like so:
cout << "The square root of " << num << " is " << sqrt(static_cast<double>(num)) << endl;