Connecting Tech Pros Worldwide Forums | Help | Site Map

error C2660: 'pow' : function does not take 1 parameters

Newbie
 
Join Date: Jan 2008
Posts: 1
#1: Jan 17 '08
Hi, I am new in C++ and was trying to run a programme where I found an error using the pow statement. Error showed is error C2660: 'pow' : function does not take 1 parameters. As I have a square on the whole equation, I am not sure whether I am sure the power function right.

Please advise, anyone?

Code shown as below:

eqn=vf[j]+((vf[j]*(1-x)+vg[j])*x);
fun3 = 1000*hf[j]+1000*hfg[j]*x+(m*m*(pow(eqn,2.0))/2-1000*h[i]-(pow(V[i],2.0)/2));

many thanks!

Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,375
#2: Jan 17 '08

re: error C2660: 'pow' : function does not take 1 parameters


Whatever error you are getting is not in this code. This compiles OK:
Expand|Select|Wrap|Line Numbers
  1. double eqn;
  2.     double vf[100];
  3.     double vg[100];
  4.     double hf[100];
  5.     double hfg[100];
  6.     double m;
  7.     double x;
  8.     int i;
  9.     double V[100];
  10.     double fun3;
  11.     int j;
  12.     double h[100];
  13.     eqn=vf[j]+((vf[j]*(1-x)+vg[j])*x);
  14. fun3 = 1000*hf[j]+1000*hfg[j]*x+(m*m*(pow(eqn,2.0))/2-1000*h[i]-(pow(V[i],2.0)/2));
  15.  
Reply