1 / 66

NSIC Technical Services Center, Okhla Phase-III, New Delhi-110020.

ON RAILWAY RESERVATION SYSTEM. SUBMITTED BY: NAME :- PINTOO MANDAL BATCH :- DAST-18. NSIC Technical Services Center, Okhla Phase-III, New Delhi-110020. ONLINE RAILWAY TICKET. ACKNOWLEDGEMENT.

keilah
Télécharger la présentation

NSIC Technical Services Center, Okhla Phase-III, New Delhi-110020.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ON RAILWAY RESERVATION SYSTEM SUBMITTED BY: NAME :- PINTOO MANDAL BATCH :- DAST-18 NSIC Technical Services Center, Okhla Phase-III, New Delhi-110020.

  2. ONLINE RAILWAY TICKET

  3. ACKNOWLEDGEMENT Every individual in professional life is keenly aware of his sense of indebtedness to many people who have stimulated and influenced his intellectual development ordinarily. This feeling is formally expressed in customary gestures of “acknowledgement”. Therefore it seems only right to acknowledge my gratitude with sense of veneration to the “ALMIGHTY GOD” and various people who helped me during the course of my project in systematic and smooth manner. I am extremely grateful to Mr. Gaurav who has the potential to explore the most intrinsic value of life and she proven her mettle by initiating the completing this project. Also very thankful, her guidance, knowledge, experience, disciplined approach, constructive criticism and valuable suggestions have been a source of inspiration to me and have made this study possible with profound sense of gratitude, I acknowledge my sincere thanks to all for this kind consideration. I am beholden to them in a special measure whose hearted support has lent me the moral strength, which was very necessary to keep me.

  4. DECLARATION I hereby declare that the project work entitled “Railway Reservation System” submitted to the NSIC, is a record of an original work done by me under the guidance of Mr. Gaurav, faculty member, NSIC TECHNICAL SERVICESCENTRE, Okhla, Phase III, New Delhi -110020. This project work has not performed the basis for the award of any Degree or diploma/ associate ship/fellowship and similar project if any. (PINTOO MANDAL) (DAST-18)

  5. PREFACE A project is a very important and mandatory part of education. It is very essential for a student before entering it. It is through a project that a student learns his/her first lesson in handling people and then completing his/her work and gets a practical knowledge of the field he/she is specializing in.

  6. CERTIFICATE This is to certify that Mr. PintooMandal has prepared and submitted the Project “Railway Reservation system” as a part for her course – Advance Diploma in Software Technology enclosed herewith under my direct and close supervision and that this is a bona fide piece of work done by her. It has not been submitted to any other university nor has it been published at any time earlier. • Date: (Signature Teacher)

  7. CONTENT • Introduction • General Information • Objective 2.1 Analysis • Requirement Specification 3.1Security • HardwareandSoftware Requirement • Hardware • Software • Feasibility study • Data Flow Diagram • E-R Diagram • Coding • Input & Output Screens • Future Scope 10.1 Survey • Bibliography

  8. -: Introduction :- 1.1 General Information:- Our website has various kinds of information that helps regarding booking of tickets via railways. Railway Ticketing is looking for an online solution to provide travellers with all facilities on internet. Providing the facilities like information of regarding trains, seat availability, online reservation/cancellation, information about train running etc. Improve Railway Ticketing is looking for an online solution to provide travellers with all facilities on internet. Providing the facilities like information of regarding trains, seat availability, online reservation/cancellation, information about train running etc. The role of local rail services is primarily cantered on improving accessibility to the key regional and sub-regional centers. Targeted development of the network through new and improved services, opening up access to communities and ensuring major new economic development areas are connected to the rail network, where a strong case can be made for investment, taking account of the strategic role of the rail network.

  9. -: Objectives :- The objective of the online railway ticket reservation system. Project is to design software to fully automate the process of issuing a railway ticket. That is:- 1. To create a database of the trains. 2. To search the trains it’s arrival and departure time, distance between source and destination. 3. To check the availability of the ticket. 4. To calculate fare. 5. To book the ticket. 6. To cancel the ticket if necessary. 2.1 Analysis:- Online railway ticket reservation is a online ticket booking website, which is capable of booking ticket and search the train availability. This website is mainly created to fulfill the following requirements, it comprises of the following properties:- • A central database that will store all information. • An online website that will provide real- time information about the availability of tickets their prices.

  10. Every registered user is able to view his booking id that has been made in his/her name. • Every registered user can change his password any time he wants to change. • Every guest user can search train availability, price of the ticket, arrival and departure time, distance between source and destination etc. • Every registered user has the facilities to print his ticket any time he wishes. Administration login • In admin mode the administrator can make changes in train details. • He can also view all booking that has been made by different users. • The booking window contains all the facilities at one place, the user can simply log in to his account and can book his ticket.

  11. 3.REQUIREMENTS SPECIFICATION:- The Software Requirements Specificationsection will deal with the technical details of the proposed system. It will contain information regarding the developmental and operational environments, user interfaces, functional and requirements specifications and the exception and error handling features of the system. The Designsection will provide a detailed insight into the working of the system, how the system to be framed to make the implementation error free and to avoid a possible rework. All the features mentioned in the SRS section will be dealt with in detail through the means of architectural design, block diagram, detailed data flow diagrams, structure charts, flow chart and any other relevant method. Through the use of pseudo-codes, the Implementation Details section will provide the final design step before actual implementation of the system. It will list all the functions that will be used in the system, parameters used by them, what results they will produce and how they will interact with the rest of the system.

  12. All queries regarding the actual performance of the developed system will be cleared in the Results and Discussionsection. It will list all the test cases, results of those tests and a discussion on whether these tests yielded the desired results or not. If negative, this section will also provide information regarding the failure. • Concluding all this will be the Summary and Conclusionsection which will round up the entire discussion. • This will be followed by the Reference/Bibliography section that will tell about the books and site that have been referred by us while developing the website. 3.1 Security:- From security point of view, authentication will be done by password checking. If correct password has been entered by the user, the user will get further access to the system, otherwise he will have to re-enter the password. The facility to change the password has also been provided but for that the user will have to first enter the old password. The password can be four characters long.

  13. HARDWARE AND SOFTWARE • REQUIREMENTS SPECIFICATION:- 4.1 Hardware Requirement:- :1 OPERATING SYSTEM • Any • 2 PROCESSOR • PENTIUM (ANY) OR AMD ATHALON(3800+- 4200+ DUAL CORE) • 3 MOTHERBOARD: • 845 OR 915,995 FOR PENTIUM 0R MSI K9MM-V VIA K8M800+8237R PLUS CHIPSET FOR AMD ATHALON • RAM:512MB+ • Hard disk: Sata 40 Gb or above • CD/DVD r/w multi drive combo • FLOPPY DRIVE 1.44 MB • MONITOR 14.1 or 15 -17 inch • Key board and mouse • Printer • 4.2 Software Requirements- 1 Any browser

  14. 5. FEASIBILITY STUDY:- TechnicalFeasibility:- Evaluating the technical feasibility is the trickiest part of a feasibility study. This is because, at this point in time, not too many detailed design of the system, making it difficult to access issues like performance, costs on (on account of the kind of technology to be deployed) etc. A number of issues have to be considered while doing a technical Analysis. i) Understand the different technologies involved in the proposed system: Before commencing the project, we have to be very clear about what are the technologies that are to be required for the development of the new system. ii) Find out whether the organization currently possesses the required technologies: • Is the required technology available with the organization? • If so is the capacity sufficient? For instance – “Will the current printer be able to handle the new reports and forms required for the new system?”

  15. Operational Feasibility:- Proposed projects are beneficial only if they can be turned into information systems that will meet the organizations operating requirements. Simply stated, this test of feasibility asks if the system will work when it is developed and installed. Are there major barriers to Implementation? Here are questions that will help test the operational feasibility of a project: Is there sufficient support for the project from management from users? If the current system is well liked and used to the extent that persons will not be able to see reasons for change, there may be resistance. • Are the current business methods acceptable to the user? If they are not, • Users may welcome a change that will bring about a more operational and useful systems. • Have the user been involved in the planning and development of the project? • Early involvement reduces the chances of resistance to the system. • General and increases the likelihood of successful project. • Since the proposed system was to help reduce the hardships encountered. In the existing manual system, the new system was considered to be operational feasible.

  16. DFD (Data Flow Diagram) 3 Level Diagrams - Level 0 -Level1 - Level 2

  17. 6. DATA FLOW DIAGRAMS The data flow diagram is a graphical representation that depicts information flow and the transforms that are applied as data moves from input to output. The DFD may be used to represent a system or software at any level of abstraction. In fact DFD may be partitioned into levels that represent increasing information flow and functional detail. The level 0 DFD or a context model represents the entire software element as a single bubble with input and output data indicated by incoming and outgoing arrows, respectively. In level 0 diagram shown below, the passenger fills either the reservation or cancellation form as input. He gets the ticket as the output and the report is sent to the administration. Up/down train info Fill cancellation and reservation from Passenger/Waiting info I am providing the Data Flow Diagram of railway reservation system. Still it's a level0 diagram but I am sure that it will help you to draw the complete DFD.

  18. Level - 1 data flow diagram A level 1 DFD is the further refinement of level 0 DFD showing greater details and functionalities. In this, the single bubble of level 0 DFD is refined further. Each of the processes depicted at level 1 is a sub function of the overall system depicted in the context model. As shown in the DFD above, the passenger either enquires about the trains or goes directly for the reservation or the cancellation processes as a result of which he gets the ticket generated. The reports are then sent to the administration.

  19. User Level 1

  20. Level - 2 data flow diagram The level 2 DFD is the further refinement of the level 1 DFD. As shown in the DFD above the passenger has many options like he can directly go to the reservation counter or can first inquire and then go to the reservation counter or he can just inquire and return back. If the passenger wants reservation then the seats are checked for availability and if the seats are available the confirmation ticket is generated otherwise he is asked for waiting and waiting ticket is generated if he wants. If the user wants tickets to be cancelled he is given the cancellation ticket and the reports of all the transactions are sent to the administrator.

  21. User Level 2

  22. Admin Level 2

  23. 6.1 DESCRIPTION OF FLOW CHART The program flowchart shows how the system proceeds from the input form to the output form of the system. It explains how the system is actually processed step by step .It represents the flow of control as the system is processed. There are three types of program flow chart: 1. Input flow chart: This flowchart depicts the basic input operations in the system. In railway reservation system, first of all the password is checked then if the password is valid then we process the input form if the data is valid then the entries are updated in the data base otherwise the form is refilled. 2. Output flow chart: This flowchart depicts the basic output operations in the system. The user is required to enter the criteria for output. If it is for the reservation then the availability if seats is checked. If the seats are available then the confirmed ticket is generated otherwise the user is asked for waiting and if he wants then waiting ticket is generated. If the user wants the seat to be cancelled it is done and the cancelled ticket is generated for the user. The information about all the above transactions is then transferred to the related databases. 3. Report flow chart: This flowchart depicts the basic operations for the generation of reports. If the entries from the processed database are valid the concerned reports are generated otherwise the process will have to be repeated.

  24. Entity Relationship Diagram:- Entity relationship diagram expresses the overall logical structure of a database graphically. It shows the relationship between different entities. The entities can have composite, multivolume or derived attributes. The entities and their attributes are: • 7. ER-DIAGRAM:- The above diagram shows the Entity Relationship diagram in which the process of booking, cancellation, choosing a class and waiting list and finding the information of PNR no. The other things in this ER diagram are about the user’s authentication whether it is official or private. In this process the information from the user are taken and based on that the seats are allotted to the users. There are different classes based on the category. This choice is taken by the user.

  25. Design Of Tables:- I have designed two tables one for passenger database and second for train database. The passenger database will contain following fields • PNR NO (Primary key) •  NAME` • AGE • GENDER • TOTAL PASSENGER  • DATE OF TRAVEL • CLASS • TRAIN NO. • LOGIN and LOGOUT The train database will contain following field. RAILWAY RESERVATION DATABASE SYSTEM • Train no. (Primary key) • Route from-to • Departure time •  No of compartments • 1 AC • 2 AC • 3AC • SLEEPER • GENERAL

  26. ADMIN TABLE The above table consists of username as a primary key which determines all other attributes of it. These are no partial and transitive dependency so it is in 3NF. USER TABLE The above table consists of username as a primary key which determines all other attributes of it. These are no partial and transitive dependency so it is in3NF.

  27. TRAIN TABLE Train number is the primary key of train table. It consists of atomic values of attributes and there is no partial and transitive dependency so it is in 3NF. TICKET TABLE

  28. 1 NF – 3 NF conversion of Train table TRAIN_DETAILS FARE TABLE

  29. Ticket_details Ticket 1 table Ticket 2 table

  30. Class_details Payment table

  31. 8. CODING:- To develop a C++ project to manage a railway ticket reservation service using object oriented programming and data file handling. • The formation of an ANSI (American National Standard Institute) C++ committee, and • The publication of the Annotated C++ Reference Manual by Ellis and Structure. One can easily judge the importance of C++ as given the following lines:-“Object-oriented technology is regarded as the ultimate paradigm for the modeling of the information in the data of logic. The C++ is now shown to fulfill this goal”.This is a project based on train reservation. The program helps us to enter, display or alter the details of different trains.Moreover & most importantly the program helps us to reserve or cancel a train ticket.The program also helps us to know the present status of a reserved ticket, i.e. whether the ticket is confirmed or not.It includes various function programs to do the above mentioned tasks. Data file handling has been effectively used in the program. This program uses the concept of object-oriented programming and data file handling.The database is a collection of interrelated data to serve multiple applications. That is database programs create files of information. So we see that files are worked with most, inside the program.DBMSThe software required for the management of data is called as DBMS. It has3 models• Relation model

  32. • Hierarchical model• Network modelRELATIONAL MODEL It’s based on the concept on relation. Relation is the table that consists of rows and columns. The rows of the table are called topple and the columns of the table are called attribute. Numbers of rows in the table is called as cardinality. Number of columns in the table is called as degree.HIERARCHICAL MODEL In this type of model, we have multiple records for each record. A particular record has one parentrecord. No child record can exist without parent record. In this, the records are organized in tree (like structureNETWORK MODEL:- In this, the data is represented by collection of records and relationship is represented by (ink or association. CHARACTERISTICS OF DB MS: -• It reduces the redundancy• Reduction of data in inconsistency• Data sharing• Data standardizationDIFFERENT TYPES OF FILES: -BASED ON ACCESS:-• Sequential file• Serial file• Random (direct access) file BASED ON STORAGE:-• Text file• Binary File

  33. RAILWAY RESERVATION SYSTEM #include<stdio .h> #include<conio .h> #include<stdlib .h> #include<string .h> #include<iostream .h> #include<time .h> #include<iomanip .h> #include<fstream .h> char f[10]="f"; char s[10]="s"; int addr,ad,flag,f1,d,m,i,amt; float tamt; class login { public: char id[100]; char pass[100]; char *password; void getid() { cout< <"Enter your id:";gets(id); password=getpass("Enter the password:"); strcpy(pass,password); } void displayid()

  34. { cout<<"Id:";puts(id); cout<<"Password:";puts(pass); } }; class detail { public: inttno; char tname[100];  char bp[100]; char dest[100]; int c1,c1fare; int c2,c2fare; intd,m,y; void getdetail() { cout<<"Enter the details as follows\n"; cout<<"Train no:";cin>>tno; cout< <"Train name:";gets(tname); cout<<"Boarding point:";gets(bp); cout<<"Destination pt:";gets(dest); cout<<"No of seats in first class & fare per ticket:"; cin>>c1>>c1fare; cout< <"No of seats in second class & fare per ticket:"; cin>>c2>>c2fare; cout< <"Date of travel:";cin>>d>>m>>y; } void displaydetail() {

  35. cout< <tno<<"\t"<<tname<<"\t"<<bp<<"\t"<<dest<<"\t"; cout<<c1<<"\t"<<c1fare<<"\t"<<c2<<"\t"<<c2fare<<"\t"; cout<<d<<"-"<<m<<"-"<<y<<"\t"<<endl; } }; class reser { public: intpnr; inttno; char tname[100]; char bp[10]; char dest[100]; char pname[10][100]; int age[20]; char clas[10]; intnosr; inti; intd,m,y; int con; float amc; void getresdet() { cout<<"Enter the details as follows\n"; cout<<"Train no:";cin>>tno; cout< <"Train name:";gets(tname); cout<<"Boarding point:";gets(bp); cout<<"Destination pt:";gets(dest); cout<<"No of seats required:";cin>>nosr; for(i=0;i<nosr ;i++)

  36. { cout<<"Passenger name:";gets(pname[i]); cout<<"Passenger age:";cin>>age[i]; } cout< <"Enter the class f-first class s-second class:"; gets(clas); cout<<"Date of travel:";cin>>d>>m>>y; cout< <"Enter the concession category\n"; cout<<"1.Military\n2.Senior citizen\n"; cout<<"3.Children below 5 yrs\n4.None\n"; cin>>con; cout< <"............END OF GETTING DETAILS............\n"; } void displayresdet() { cout<<"...............................................\n"; cout<<"...............................................\n"; cout<<"Pnr no:"<<pnr; cout<<"\nTrain no:"<<tno; cout<<"\nTrain name:";puts(tname); cout<<"Boarding point:";puts(bp); cout<<"Destination pt:";puts(dest); cout<<"No of seats reserved:"<<nosr; for(i=0;i<nosr;i++) { cout<<"Passenger name:";puts(pname[i]); cout<<"Passenger age:"<<age[i]; } cout<<"\nYour class:";puts(clas); cout<<"\nDate of reservation:"<<d<<"-"<<m<<"-"<<y;

  37. cout<<"\nYour concession category:"<<con; cout<<"\nYou must pay:"<<amc<<endl; cout<<"***********************************************\n"; cout<<".........END OF RESERVATION.................\n"; cout<<"***********************************************\n"; } }; class canc { public: intpnr; inttno; char tname[100]; char bp[10]; char dest[100]; char pname[10][100]; int age[20]; inti; char clas[10]; intnosc; intd,m,y; float amr; void getcancdet() { cout<<"Enter the details as follows\n"; cout<<"Pnr no:";cin>>pnr; cout< <"Date of cancellation:";cin>>d>>m>>y; cout< <"...........END OF GETTING DETAILS...........\n"; } void displaycancdet()

  38. { cout<<"...........................................\n"; cout<<"...........................................\n"; cout<<"Pnr no:"<<pnr; cout<<"\nTrain no:"<<tno; cout<<"\nTrain name:";puts(tname); cout<<"Boarding point:";puts(bp); cout<<"Destination pt:";puts(dest); cout<<"\nYour class:";puts(clas); cout<<"no of seats to be cancelled:"<<nosc; for(i=0;i<nosc;i++) { cout<<"Passenger name:";puts(pname[i]); cout<<"passenger age:"<<age[i]; } cout<<"\nDate of cancellation:"<<d<<"-"<<m<<"-"<<y; cout<<"\nYou can collect:"<<amr<<"rs"<<endl; cout<<"*****************************************\n"; cout<<".........END OF CANCELLATION.............\n"; cout<<"*****************************************\n"; } }; void manage(); void can(); void user(); void database(); void res(); void reserve(); void displaypassdetail();

  39. void cancell(); void enquiry(); void main() { clrscr(); intch; cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; cout<<".......WELCOME TO RAILWAY RESERVATION SYSTEM..........\n"; cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; do { cout<<"^^^^^^^^^^^^^^^^^^^^^^MAIN MENU^^^^^^^^^^^^^^^^^^^^\n"; cout<<"1.Admin mode\n2.User mode\n3.Exit\n"; cout<<"Enter your choice:"; cin>>ch; cout< <endl; switch(ch) { case 1: database(); break; case 2: user(); break; case 3: exit(0); }

  40. }while(ch<=3); getch(); } void database() { char *password; char *pass="12345678"; password=getpass("Enter the administrator password:"); detail a; fstream f; intch; char c; if(strcmp(pass,password)!=0) { cout<<"Enter the password correctly \n"; cout<<"You are not permitted to logon this mode\n"; goto h; } if(strcmp(pass,password)==0) { char c; do { cout<<"...........ADMINISTRATOR MENU...........\n"; cout<<"1.Create detail data base\n2.Add details\n"; cout<<"3.Display details\n4.User management\n"; cout<<"5.Display passenger details\n6.Return to main menu\n"; cout<<"Enter your choice:"; cin>>ch; cout< <endl;

  41. switch(ch) { case 1: f.open("t.txt",ios::out|ios::binary); do { a.getdetail(); f.write((char *) & a,sizeof(a)); cout<<"Do you want to add one more record?\n"; cout<<"y-for Yes\nn-for No\n"; cin>>c; }while(c=='y'); f.close(); break; case 2: f.open("t.txt",ios::in|ios::out|ios::binary|ios::app); a.getdetail(); f.write((char *) & a,sizeof(a)); f.close(); break; case 3: f.open("t.txt",ios::in|ios::out|ios::binary|ios::app); f.seekg(0); while(f.read((char *) & a,sizeof(a))) { a.displaydetail(); } f.close(); break; case 4:

  42. manage(); break; case 5: displaypassdetail(); break; } }while(ch< =5); f.close(); } h: } void reserve() { intch; do { cout<<"1.Reserve\n2.Return to the main menu\n"; cout<<"Enter your choice:"; cin>>ch; cout< <endl; switch(ch) { case 1: res(); break; } }while(ch==1); getch(); } void res()

  43. { detail a; reser b; fstream f1,f2; time_t t; f1.open("t.txt",ios::in|ios::out|ios::binary); f2.open("p.txt",ios::in|ios::out|ios::binary|ios::app); intch; b.getresdet(); while(f1.read((char *) &a,sizeof(a))) { if(a.tno==b.tno) { if(strcmp(b.clas,f)==0) { if(a.c1>=b.nosr) { amt=a.c1fare; addr=f1.tellg(); ad=sizeof(a.c1); f1.seekp(addr-(7*ad)); a.c1=a.c1-b.nosr; f1.write((char *) & a.c1,sizeof(a.c1)); if(b.con==1) { cout< <"Concession category:MILITARY PERSONNEL\n"; b.amc=b.nosr*((amt*50)/100); } else if(b.con==2)

  44. { cout<<"Concession category:SENIOR CITIZEN\n"; b.amc=b.nosr*((amt*60)/100); } else if(b.con==3) { cout<<"Concession category:CHILDERN BELOW FIVE\n"; b.amc=0.0; } else if(b.con==4) { cout<<"You cannot get any concession\n"; b.amc=b.nosr*amt; } srand((unsigned) time(&t)); b.pnr=rand(); f2.write((char *) & b,sizeof(b)); b.displayresdet(); cout<<"------------------------------------------------------\n"; cout<<"--------------Your ticket is reserved-----------\n"; cout<<"-----------------End of reservation menu-------\n"; } else { cout<<"**********Sorry req seats not available********\n"; } } else if(strcmp(b.clas,s)==0) { if(a.c2>=b.nosr)

  45. { amt=a.c2fare; addr=f1.tellg(); ad=sizeof(a.c2); f1.seekp(addr-(5*ad)); a.c2=a.c2-b.nosr; f1.write((char *) & a.c2,sizeof(a.c2)); if(b.con==1) { cout< <"Concession category:MILITARY PRESONNEL\n"; b.amc=b.nosr*((amt*50)/100); } else if(b.con==2) { cout<<"Concession category:SENIOR CITIZEN\n"; b.amc=b.nosr*((amt*60)/100); } else if(b.con==3) { cout<<"Concession category:CHILDERN BELOW FIVE\n"; b.amc=0.0; } else if(b.con==4) { cout<<"You cannot get any concession\n"; b.amc=b.nosr*amt; } f2.write((char *) & b,sizeof(b));

  46. b.displayresdet(); cout<<"---------------------------------------\n"; cout<<"--------Your ticket is reserved--------\n"; cout<<"------------End of reservation---------\n"; } else { cout<<"********Sorry req no of seats not available*******\n"; } } getch(); goto h; } else { flag=0; } } if(flag==0) { cout<<"............Wrong train no......................\n"; cout<<"......Enter the train no from the data base.....\n"; } f1.close(); f2.close(); getch(); h: } void displaypassdetail() {

  47. fstream f; reser b; f.open("p.txt",ios::in|ios::out|ios::binary); f.seekg(0); while(f.read((char *) & b,sizeof(b))) { b.displayresdet(); } f.close(); getch(); } void enquiry() { fstream f; f.open("t.txt",ios::in|ios::out|ios::binary); detail a; while(f.read((char *) & a,sizeof(a))) { a.displaydetail(); } getch(); } void cancell() { detail a; reser b; canc c; fstream f1,f2,f3; f1.open("t.txt",ios::in|ios::out|ios::binary); f2.open("p.txt",ios::in|ios::out|ios::binary);

More Related