ok i am working on a parking fee problem and i have no idea what is wrong with my program, still pretty new to c++, any help would be appreciated.
The error i am getting is:
parking fees.obj : error LNK2019: unresolved external symbol "double __cdecl totalcost(double)" (?totalcost@@YANN@Z) referenced in function _main
1>parking fees.obj : error LNK2019: unresolved external symbol "double __cdecl totaltime(double)" (?totaltime@@YANN@Z) referenced in function _main
1>F:\C++ Programming\functions\parking fees 2\Debug\parking fees 2.exe : fatal error LNK1120: 2 unresolved externals
#include <iostream>
#include <iomanip>
using namespace std;
double totaltime(double);
double totalcost(double);
int main()
{ double time=0;
cout<<"The Price Is "<<endl<<setprecision(2)<<setiosflags(ios::fixed|ios::showpoint)<<setw(16)<<totalcost(totaltime(0))<<endl;
system("PAUSE");
return 0;}
double totaltime(double at, double lt,double time)
{
if (at==0)//i dont think this is neccesaary, but what bout if they drop it off at 8pm and pick
at=24;//it up till 4 am the next day, u know like a concert or a game or something?
if (lt==0)
lt=24;
cout<<"Arrival Time (24 Hour)\n";
cin>>at;
cout<<"Leave Time (24 Hour)\n";
cin>>lt;
time=lt-at-3;
return time;}