I'm creating a c++ program on cab programming and I need some help . I've done half the program till the point that I've put in the details for the fare and stuff and I need to use file handling and some other basic c++ stuff .
Please tell me what to do
public :
int fare()
{
int price,fare;
cout<< "\t\t\t\t" << " cab booking " << "\n" <<endl;
cout<< "\n\n\n" << "There are 5 to vechiles to choose from" << "\n" << endl;
cout<< "A.. Auto at 10.00/km"<<"\n"<<endl;
cout<< "B.. Micro at 20.00/km"<<"\n"<<endl;
cout<< "C.. Mini at 30.00/km"<<"\n"<<endl;
cout<< "D.. Prime at 40.00/km"<<"\n"<<endl;
cout<< "E.. Cycle at 1.00/km"<<"\n"<<endl;
cout << " Which Vechile would you like to book (A,B, C or D)" << "\n" << endl;
cin >> choice;
switch (choice)
{
case 'A':
price = 10;
break;
case 'B':
price = 20;
break;
case 'C':
price = 30;
break;
case 'D':
price = 40;
break;
}
fare =price*distance;
{
}C;
void main ()
{
clrscr()
int distance;
char choice;
cout<<"\t******************************\n";
cout<<"\t* Welcome *\n";
cout<<"\t* To *\n";
cout<<"\t* Gola cbs *\n";
cout<<"\t******************************\n";
char loc[20],drop[20];
cout<<"Enter the current location ";
gets(loc);
cout<<"Enetr the drop location ";
gets(drop);
cout<<loc<<" "<<drop;
cout<<"enter the distance";
cin>>distance;
int cabs;
randomize();
cabs=random(2);
if(cabs=0)
{ cout<<"cabs not found";}
else
(