When my try to rebuild my program i m getting this errors
1>Linking...
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\agaba\Documents\Visual Studio 2005\Projects\car\Debug\car.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Users\agaba\Documents\Visual Studio 2005\Projects\car\car\Debug\BuildLog.htm"
1>car - 2 error(s), 0 warning(s)
my code
// Short-term parking at the airport, from 4am to midnight.
#include <iostream>
using namespace std;
// function
void AskTimeIn(int *pHourIn,int *pMinIn);
void AskTimeOut(int *pHourOut,int *pMinOut);
void write(int hoursIn,int minsIn,int hoursOut,int minsOut);
int maint()
{
int hoursIn, minsIn,hoursOut, minsOut;
// difine fuction
AskTimeIn(&hoursIn,&minsIn); //time in function.
AskTimeOut(&hoursOut,&minsOut);//time out function.
write(hoursIn,minsIn,hoursOut,minsOut);// write result function.
return 0;
}
void AskTimeIn(int *pHourIn,int *pMinIn)
{
char colon;
cout <<"\n Enter Time in ,H:M format: ";
cin >>*pHourIn>>colon>>*pMinIn;
cin.ignore();
}
void AskTimeOut(int *pHourOut,int *pMinOut)
{
char colon;
cout <<"\n Enter Time out ,H:M format: ";
cin>>*pHourOut>>colon>>*pMinOut;
cin.ignore();
}
void write(int hoursIn,int minsIn,int hoursOut,int minsOut)
{
cout<<"\n Time in :"<<hoursIn<<":"<<minsIn;
cout<<"\n Time out :"<<hoursOut<<":"<<minsOut;
}