Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

math.h function help

Status
Not open for further replies.

cepccw

Programmer
Apr 29, 2002
1
CA
Here is my code, I get the error error "C2660: 'pow' : function does not take 2 parameters" referring to the line that says "pow(3, 2);
I need to output 3 to the power of 2 and that is all. Please help me out.
#include<iostream.h>
#include<math.h>

math()
{
double pow();
double x = 2,y = 3;
double x_to_the_y;

cout << pow(3, 2);

return 0;
}
 


math()
{
double pow();
double x = 2,y = 3;
double x_to_the_y;

cout << pow(3, 2);

return 0;
}

remove the bold line. I think this is where the problem is.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top