By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

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

P: 1
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!
Jan 17 '08 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
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.  
Jan 17 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.