What's wrong with what I am doing?

doing this program for class. it came up with the error message:error LNK2019: unresolved external symbol "void __cdecl torque(double,double,double)" (?torque@@YAXNNN@Z) referenced in function _main
and it also says unresolved external

Can someone please help me?

#include <iostream>
#include <cmath>

using namespace std;

void torque(double, double, double);

int main()
{
double dist, force, angle;
cout << "Please enter a value for the length of the wrench: ";
cin >> dist;
cout << "\n";
cout << "Please enter a value for the applied force: ";
cin >> force;
cout << "\n";
cout << "Please enter a value for the angle: ";
cin >> angle;
cout << "\n";
torque(dist, force, angle);
return 0;
}

void toruqe(double dist, double force, double angle)
{
const double TORADIANS = 3.14159/180;
cout << "The torque is: " << dist*force*sin(angle*TORADIANS)
<< "N-m." << endl;
return;
}
Oh, c'mon!
Take a second look at the function you wrote if you get an error saying that there is no such function.
1
2
3
4
void toruqe torque(double dist, double force, double angle)
{
    // ...
}
D'oh! Thanks JLBorges!
Topic archived. No new replies allowed.