Page 444 - C++
P. 444

if(strcmpi(qmob,C.Return_Mobile1())==0||strcmpi(qmob,C.Return_Mobil
                e2())==0)
                              {
                                      flag=1;
                                      C.CDisplaydata();
                              }
                       }
                       if(flag==0)
                       {
                              cout<<"\nNo record found";
                       }
                       getch();
                }
                /*************************************************************/
                void q_company()
                {
                       char qcompany[20];
                       int flag=0;
                       ifstream fin("contact.dat",ios::in|ios::binary);
                       Contact C;
                       cout<<"\nEnter the Name of the Company you want to find : ";
                       gets(qcompany);
                       while(fin.read((char *)&C,sizeof(C)))
                       {
                              if(strcmpi(qcompany,C.Return_Company())==0)
                              {
                                      flag=1;
                                      C.CDisplaydata();
                              }
                       }
                       if(flag==0)
                       {
                              cout<<"\nNo record found";
                       }
                       getch();
                }
                /*************************************************************/
                void sch_add()
                {
                       Schedule S;
                       ofstream fout("schedule.dat",ios::app|ios::binary);
                       S.SGetdata();
                       fout.write((char*)&S,sizeof(S));
                       cout<<"\nYour information is in safe hands :) ";
                       fout.close();
                }
                /*************************************************************/
                void sch_delete()
                {
                       Schedule S;
                       Date d;
                       char r;
                       ifstream fin("schedule.dat",ios::in|ios::binary);
   439   440   441   442   443   444   445   446   447   448   449