473,480 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

1 New Member
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 5895
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
4143
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
2696
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
2452
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
59540
by: Chris Stankevitz | last post by:
Q1: Does c++ provide pow(int,int)? Q2: If not, why not? Thanks, Chris
3
3407
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
10733
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
2515
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
23315
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
14878
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
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7084
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6739
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.