|
Ok, normally I don't dive into other's code, but I did this time.
You call the function Torque:
Torque(Engine_Speed, Throttle);
Then you want output from that function:
cout << Torque;
But, that doesn't work because:
The function torque returns a double. You need to print that double, not print the function Torque.
So, to fix it you can assign the double to a variable:
double torq = Torque(Engine_Speed, Throttle);
cout << torq;
Or print the output from Torque directly:
cout << Torque(Engine_Speed, Throttle);
If you do it the way you do: cout << Torque; You'll print out the memory address of the function Torque.
|