I'm not sure. I'm not really too good with linker errors.
What other files do you have? Put those up on pastebin. (that is, files besides the main menu)
This is the loop.. It's not done yet.
But here when according to this code, the loop is supposed to stop when you enter 0.
Here the 0 is considered with the "else" and says invalid ! Why?
int number;
do
{
cout<<"Hello and welcome to J-Otaku-Air travel agency."<<endl
<<"Please choose a number from the following menu, then press enter to "
<<"move to the desired page."<<endl<<endl
<<"1. About J-Otaku-Air"<<endl
<<"* Press 0 to exit"<<endl<<endl;
cin>> number;
if (number==1)
{
cout<<endl
<<"J-Otaku-Air was founded on July 1990."<<endl
<<"Fadia Banafe built this company with the goal of helping"<<endl
<<"accommodate the curious nature of people and their need for exploration. "<<endl
<<"Throuh out the years, J-Otaku-Air has been thriving to expand its services and"<<endl;
cout<<"offer the best for their clients. And along their journey their hard work has"<<endl
<<"been rewarded by many establishments."<<endl
<<"In hopes of seeing you in one of our flights."<<endl<<endl
<<"Sincerely,"
<<endl
<<" J-Otaku-Air"
<<"\t\t\t\t Fly Safe, Fly Otaku.."<<endl<<endl<<endl;
}
else
cout<<"Invalid entry!!"<<endl<<endl;
break;
}while(number!=0);
OMG ! I got 102 errors for the implementation of the PassengerMenu class!!!!
Please check it !
# include <iostream>
# include <string>
# include "PassengerMenu.h"
using namespace std;
int PassengerMenu:: Reservations()
{
int tkt_cost, yen_tkt_cost;
cout << "2. Reservations:"<<endl
<<endl
<< "Hello and welcome to the reservation area."<<endl
<< "Here you can choose your desired travel location and book a flight directly."<<endl
<<endl;
cout << "Would you like to continue? (Y/N)"<<endl;
cin>>choice;
if (choice== 'Y' ||choice=='y')
{
cout<<"Please choose a destination from the following list:"<<endl;
cout << "1.Hiroshima"<<endl;
cout << "2.Nagasaki"<<endl;
cout << "3.Osaka"<<endl;
cout << "4.Yokohama"<<endl;
cout << "0 to exit this menu."<<endl;
cin>> answer;
switch (answer)
{
case 1:
char convert_YN,pick_YN;
cout << "You chose Hiroshima, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Hiroshima costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 2:
cout << "You chose Nagasaki, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Nagasaki costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 3:
cout << "You chose Osaka, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Osaka costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 4:
cout << "You chose Yokohama, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Yokohama costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
# include <iostream>
# include <string>
# include "PassengerMenu.h"
usingnamespace std;
int PassengerMenu:: Reservations()
{
int tkt_cost, yen_tkt_cost;
cout << "2. Reservations:"<<endl
<<endl
<< "Hello and welcome to the reservation area."<<endl
<< "Here you can choose your desired travel location and book a flight directly."<<endl
<<endl;
cout << "Would you like to continue? (Y/N)"<<endl;
cin>>choice;
if (choice== 'Y' ||choice=='y')
{
cout<<"Please choose a destination from the following list:"<<endl;
cout << "1.Hiroshima"<<endl;
cout << "2.Nagasaki"<<endl;
cout << "3.Osaka"<<endl;
cout << "4.Yokohama"<<endl;
cout << "0 to exit this menu."<<endl;
cin>> answer;
switch (answer)
{
case 1:
char convert_YN,pick_YN;
cout << "You chose Hiroshima, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Hiroshima costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 2:
cout << "You chose Nagasaki, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Nagasaki costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 3:
cout << "You chose Osaka, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Osaka costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
case 4:
cout << "You chose Yokohama, is that correct? (Y/N)\a"<<endl;
cin>> choice;
if ((choice=='Y') || (choice=='y'))
{
cout << "The price of each seat from Tokyo to Yokohama costs 200 Dollars"<<endl;
cout << "Would you like to convert the amount into Yen?(Y/N)\a"<<endl;
cin >> choice;
if ((choice=='Y') || (choice=='y'))
{
//convertion function call
cout << "Please enter the value in Dollars that you want to convert to Yen"<<endl;
Conversion_DOLLAR_TO_YEN();
}
else
{
cout << "How many seats would you like to reserve?"<<endl;
cin >> seats;
cout << "You have booked "<<seats<< " seats."<<endl;
tkt_cost=200*seats;
cout << "The total cost of your ticket(s) will be: "<<tkt_cost<<"$"<<endl;
yen_tkt_cost=tkt_cost*95.1384264;
cout << "which is "<<yen_tkt_cost<<" Yen."<<endl;
cout << "Please visit your nearest travel agency to confirm your reservation."<<endl;
cout << "Also, keep in mind that this ticket is only valade"<<endl;
cout << "for 3 months from the time of purchase."<<endl;
}
}
break;
}
}
double Conversion_DOLLAR_TO_YEN (double dollar_Z)
{
crvrtd_dl=dollar_Z*95.1384264;
return (crvrtd_dl);
}
My dear.. I'm not very good with files..
I think I'd ruin the program if I used files more than it's already ruined!
I'm out of time n' need to finish it by today! :( I don't really think its a good idea for me to add files here.
int number;
do
{
cout<<"Hello and welcome to J-Otaku-Air travel agency."<<endl
<<"Please choose a number from the following menu, then press enter to "
<<"move to the desired page."<<endl<<endl
<<"1. About J-Otaku-Air"<<endl
<<"* Press 0 to exit"<<endl<<endl;
cin>> number;
if (number==1)
{
cout<<endl
<<"J-Otaku-Air was founded on July 1990."<<endl
<<"Fadia Banafe built this company with the goal of helping"<<endl
<<"accommodate the curious nature of people and their need for exploration. "<<endl
<<"Throuh out the years, J-Otaku-Air has been thriving to expand its services and"<<endl;
cout<<"offer the best for their clients. And along their journey their hard work has"<<endl
<<"been rewarded by many establishments."<<endl
<<"In hopes of seeing you in one of our flights."<<endl<<endl
<<"Sincerely,"
<<endl
<<" J-Otaku-Air"
<<"\t\t\t\t Fly Safe, Fly Otaku.."<<endl<<endl<<endl;
}
elseif (number!=0) //add this condition, in case the number is not 0 OR 1
cout<<"Invalid entry!!"<<endl<<endl;
//break; NO BREAK NEEDED
}while(number!=0);
Ah.. I changed lots of stuff..
Can someone check these links and tell me what I should do?? ! I'm literally depressed now because of it. Whenever I do something it is wrong.
I still didn't wrote the security menu..
But for now this is it.
The main loop IS my major problem i don't know how to do it.
I haven't checked your links but unless a program is quite large in size, 102 erroros probably means you're doing the same thing over and over again, one error is causing the convsecutive errors.
Can you name some of the errors along with the file it is associated with?