(Im using VS C++ EE 2008)

Hi people, i have had a strange problem today. Im currently programming something to do with Physics. I have searched the Internet already for the answer, including this site. The problem is:
error C2064: term does not evaluate to a function taking 1 arguments

For the other topics i saw this in, it seemed to be that they had a variable with the same name as a function or similar, and they all were with user-defined functions.

My problem is slightly different, the functions I am trying to use are predefined. (Trignometry functions: cos and sin) I have checked the variables, and i have not used any with the same name. Here's the code:

double accelerate(double t_a,double t_f)
{
	return -9.8(sin(t_a) + (t_f * cos(t_a)));
}

Thats where the error occurs, includes:

#include <iostream>
#include <windows.h>

#include <math.h>

#include "physics.h"

using namespace std;

Only use (so far) of function:

double angle = atan2(track[(int)position].e_height-track[(int)position].s_height,1);
cout << "\nAngle: " << radtodeg(angle);
// Now, work out acceleration and it's direction
acceleration = accelerate(angle,0.06);
speed += acceleration / 33;
position += speed / 33;

(I have no where near finished this, but i cannot continue to i can get this working)

Thanks for any help, and sorry if i missed something, or there is another post about this, i didn't see it! :D

EDIT: So sorry, very stupid mistake on my part :P I was using 9.8( as you would in math, instead of 9.8 * (

Sorry for your time :D

Why do you use old-style header for the math library? #include <math.h> in C++, the new-style headers are preferred: #include <cmath> :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.