0

DEBUGGING SOURCE CODE FILE FOR A UNIVERSITY IT PROJECT ON AIRLINE TICKETING

Can someone help me to debug this programme source file in C++ and make int run successfully. I need answers as early as possible to help me with a successful project work presentation. Please. Thank you so much. /* This programme is a suggested module to help the customer to: 1. Book or reserve a flight 2. Cancel an already book or reserved flight 3. Make enquiries based on flight information given */ #include<iostream> #include<cmath> #include<string> using namespace std; /* These are the functions in our programme to enable the user to either book, cancel or make enquiries about a flight*/ //This is the flight booking function module void Booking(){ //Variable declaration char a; cout<<"Welcome to the Flight Booking module. For Flight to the US press 1, to the UK press 2"; cin>>a; //The switch enables making decisions switch (a){ case '1': cout<<"The flight to the US would be on the 31st of April 2017 at 3:00 GMT. Please make payments earlier than the 27th of April 2017. Thank you."; break; case '2': cout<<"The flight to the UK would be on the 3rd of March 2017 at 14:00 GMT. Please make payments before the 31st of April, 2017. Thank you."; break; default: cout<<"You have made no input or your input is incorrect please check and try again."; /* The default statements are initiated when the customer's choice does not meet the criteria given */ } } //This is the Cancellation function module void Cancellation(){ //Variable declaration char b; string name; string flight_no; string amount_paid; cout<<"Please enter your name, the flight number and amount you paid."; cin>> name >>" ">> flight_no>>" ">> amount_paid; cout<<"Your name is "<<name<<" You requested to cancel flight number "<<flight_no<<" Your refund amount is "<<amount_paid; cout<<"Do you still want to cancel your flight? \n"; cout<<"Press 1 for yes and 2 for no."; char b; //The switch allows for decision making by customer switch (b) { case '1': cout<<"Thank you for patronizing our services

29th Apr 2017, 3:29 PM
Tsadidey Fortune Selassie
Tsadidey Fortune Selassie - avatar
3 Respostas
+ 9
Try to use Code Playground.
29th Apr 2017, 3:39 PM
The Unknown
The Unknown - avatar
+ 4
SL has code playground..bro
29th Apr 2017, 3:33 PM
Calviղ
Calviղ - avatar
+ 2
In Cancellation(): cin>> name >>" ">> flight_no>>" ">> amount_paid; Nope, cin is for input, so the " "'s are an error. cin>> name >> flight_no >> amount_paid; You defined char b twice No input for b and the rest is cut off ^^
29th Apr 2017, 3:41 PM
Dennis
Dennis - avatar