Hi all I am receiving these errors when compiling my code, I am new to C++ programming and have trouble with the actual writing of codes. Here are the errors I am getting. I am not looking for an answer but a step in the right direction to get the correct anwswer. Thanks in advance.
error LNK2019: unresolved external symbol "double __cdecl computecartwo(double,double)" (?computecartwo@@YANNN@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "double __cdecl computecarone(double,double)" (?computecarone@@YANNN@Z) referenced in function _main
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\will\Desktop\CIS 110\milespergallon\Debug\milespergallon.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\will\Desktop\CIS 110\milespergallon\milespergallon\Debug\BuildLog.htm"
Here is the code:
// trying to compute the miles per gallon delivered by each car.
#include <iostream>
using namespace std;
const double Gallons_Per_Liter = 0.264179;
double computecarone(double litersUsed, double milesTraveled);
double computecartwo(double litersUsed, double milesTraveled);
int main()
{
double litersUsed;
double milesTraveled;
double carone;
double cartwo;
cout << "Enter the number of liters of gasoline the first car used: ";
cin >> litersUsed;
cout << "Enter the number of miles the first car traveled: ";
cin >> milesTraveled;
cout << "Enter the number of miles gasoline the second car used: ";
cin >> litersUsed;
cout << "Enter the number of miles the second car traveled: ";
cin >> milesTraveled;
carone = computecarone(litersUsed, milesTraveled);
cartwo = computecartwo(litersUsed, milesTraveled);
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout << "The number of miles per gallon the first car delivered is: "
<< carone << endl;
cout << "The number of miles per gallon the second car delivered is: "
<< cartwo << endl;
return 0;
}