472,958 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

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

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
1 5862
weaknessforcats
9,208 Expert Mod 8TB
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

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

Similar topics

3
by: Victor | last post by:
I'm trying to run this java program, but somehow the program always quit w/o giving any error msg at all. it happenned inside the first case statements. Strangely, after printing happen2, it just...
1
by: limelight | last post by:
I have discovered a math error in the .NET framework's Log function. It returns incorrect results for varying powers of 2 that depend on whether the program is run from within the IDE or from the...
42
by: John Smith | last post by:
In a C program I need to do exponentiation where the base is negative and the exponent is a fraction. In standard C this would be something like t = pow(-11.5, .333), but with this combination of...
8
by: Chris Stankevitz | last post by:
Q1: Does c++ provide pow(int,int)? Q2: If not, why not? Thanks, Chris
3
by: raveneros | last post by:
error C2660: 'checkF' : function does not take 1 parameters this is the error. void checkF(char s,char dStr) { for (int i=0; i<count; ++i) if (strcmp(s, list.getId())==0) ...
1
by: Minx | last post by:
This seems like a cool site, I wish I could have found this sooner. Can someone pls help me with this line of code? I get an error C2660 telling me the function does not take an argument ( The...
5
by: aaragon | last post by:
Hi everyone, I wrote a very simple function to try to understand the casting of variables in C++. The function is function foo() { std::vector<inttest(100); randomize(test); unsigned long...
1
by: urkel | last post by:
Hi everyone, I critically need help to solve this problem related to pointer in C++ Basically, I have a C/C++ program "retardselfenerg" calling a Fortran 90 subroutine "surfGF4.f90". i am so...
2
by: yalbizu | last post by:
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OF_STUDENTS=20; struct studentType { string studentFName; string studentLName;
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.