Homework Help Using Functions
Hi,
I'm trying to write a program that will give me miles per hour. This is what I have so far:
Code:
#include <iostream>
#include <iomanip>
using namespace std;
void GetData( float&, float& );//Fill in the function prototype for GetData
int main()
{
float miles;
float hours;
float milesPerHour;
cout << "Input miles and hours "<<endl;
cin >> milesPerHour;
cout << fixed << showpoint;
cout << "The miles per hour are: " <<endl;
GetData(miles, hours);
//Fill in the code to invoke the function GetData
milesPerHour = miles / hours;
cout << setw(10) << miles
<< setw(10) << hours
<< setw(10) << milesPerHour << endl;
return 0;
}
I'm getting 2 error messages after I try and run this program. They are: lab3 error LNK2001: unresolved external symbol "void __cdecl GetData(float &,float &)" (?GetData@@$$FYAXAAM0@Z)
and the second error is: lab3 fatal error LNK1120: 1 unresolved externals
Can someone help me please??