Page 391 - C++
P. 391

if (t1[0] == '0')
         return ;
         if (strlen(t1) ==0)
         {
         valid = 0 ;
         LIST() ;
         clrscr() ;
         }
         if (!FOUND(tno) && valid)
         {
         valid = 0 ;
         gotoxy(3,23) ; clreol() ;
         cout <<"\7 Record not found" ;
         getch() ;
         }
         } while (!valid) ;
         clrscr() ;
         fstream file ;
         file.open("PASS.DAT", ios ::in|ios::binary) ;
         while (file.read((char *) this, sizeof(PASSANGER)))
         if (ticketno == tno)
         break ;
         file.close() ;
         int i=1 ;
         file.open("TICKET.DAT", ios::in|ios::binary) ;
         while (file.read((char *) this, sizeof(TICKET)))
         {
         if (slno == i)
         break ;
         i++ ;
         }
         file.close() ;
         PASSANGER p ;
         gotoxy(33,6) ;
         cout <<"Ticket no.  "<<tno ;
         gotoxy(17,9) ;
         cout <<from <<" to" <<to ;
         gotoxy(45,9) ;
         cout <<"Flight no.  "<<fltno ;
         gotoxy(20,11) ;
         cout <<"Passanger Name:  "<<p.NAME(tno) ;
         gotoxy(20,13)                 ;
         cout <<"Address:  "<<address ;
         gotoxy(20,15) ;
         cout <<"Sex: " <<sex ;
         gotoxy(20,17) ;
         cout <<"Age:  "<<age ;
         gotoxy(45,19) ;
         if (Class == 'E')
          cout<< "Total Fair: "<<ecofair ;
         else
         cout <<"Total Fair:  "<<exefair;
         gotoxy(10,25) ;
         cout <<"Press any key to continue. .." ;
         getch();
         }
         //---------------------------------------------------------------------------
         // THIS FUNCTION GIVE FLIGHT NO. TO DELETE ALL PASSANGER
         // RECORDS
         //---------------------------------------------------------------------------
         void RESERVE :: DELETE_ALL(void)
         {
         clrscr();
         ENQUIRY();
   386   387   388   389   390   391   392   393   394   395   396