| | |
Help on fatal error :S!!
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2009
Posts: 63
Reputation:
Solved Threads: 0
Hello..
i'm working on my project.. it's the first time i do a C++ project..
but i'm getting this fatal error..
if any one knows how to solve it plz tell me..
also if anyone have any idea or advice to improve the program plz go ahead.
and this is the compiler's message:
1>------ Build started: Project: leish, Configuration: Debug Win32 ------
1>Compiling...
1>WHYYme.cpp
1>c:\users\fofa\documents\visual studio 2005\projects\leish\whyyme.cpp(103) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\fofa\documents\visual studio 2005\projects\leish\whyyme.cpp(6)' was matched
1>Build log was saved at "file://c:\Users\fofa\Documents\Visual Studio 2005\Projects\leish\Debug\BuildLog.htm"
1>leish - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
plz help!
i'm working on my project.. it's the first time i do a C++ project..
but i'm getting this fatal error..
if any one knows how to solve it plz tell me..
also if anyone have any idea or advice to improve the program plz go ahead.
C++ Syntax (Toggle Plain Text)
#include <iostream> using namespace std; int main () { int faq_choice,faq_YN; cout << "\t\t\t ================= "<<endl; cout << "\t\t\t || || || || "<<endl; cout << "\t\t\t || || || || "<<endl; cout << "\t\t\t || || || "<<endl; cout << "\t\t\t \\ || || "<<endl; cout << "\t\t\t \\ || "<<endl; cout << "\t\t\t \\ || "<<endl; cout << "\t\t\t \\|| J-Otaku-Air "<<endl; cout <<endl; cout <<endl; do { cout << "Welcome to the Frequently Asked Questions (FAQ) area."<<endl; cout << "Bellow is a list of frequently asked questions."<<endl; cout << "Choose the number of the required quest then press Enter to show the answer."<<endl; cout <<endl; cout <<endl; cout << "Q1. Should I reconfirm my flights, hotel or car reservations?"<<endl; cout << "Q2.What happens if the airline has changed my flights?"<<endl; cout << "Q3.Do you deliver tickets to other countries?"<<endl; cout << "Q4.Do you deliver tickets to a hotel/business or alternate place"<<endl; cout << "other than my home?"<<endl; cout << "Q5.What if my tickets are lost or stolen?"<<endl; cout <<endl; cin >> faq_choice; cout <<endl; cout << "Are you sure you want question number "<<faq_choice << " ?(Y/N)"<<endl; cin >> faq_YN; cout <<endl; cout <<endl; if ((faq_YN=='N') && (faq_YN=='n')) { cout << "If you are not happy with your choice, then please choose another question"<<endl; } if ((faq_YN=='Y') && (faq_YN=='y')) { cout<<"Here is the answer."<<endl; } switch (faq_YN) { case (1): cout << "Travelers are advised to contact the airline, hotel or car rental company"<<endl; cout << "at least 72 hours prior to departure."<<endl; break; case (2): cout << "If the airline changed or cancelled your flights, the airline must assist you."<<endl; cout << "J-Otaku Air did not change the flights. The airline did,"<<endl; cout << "thus the airline must fix your itinerary and/or ongoing travel."<<endl; break; case (3): cout << "Yes, we deliver tickets to other countries."<<endl; cout << "Delivery is via electronic ticketing for claiming at the airport ticket counter,"<<endl; cout << "or paper ticket via courier. Our booking engine will advise you as to the form "<<endl; cout << "of delivery for the flights that you have chosen."<<endl; break; case (4): cout << "Yes, we deliver tickets to your hotel/business or office or any alternate address"<<endl; cout << "where a courier may get signature for delivery of the package. "<<endl; cout << "Postal office boxes (PO Boxes) are not allowed. "<<endl; break; case (5): cout << "If your paper airline tickets are lost or stolen, please contact us or call us immediately."<<endl; cout << "If your original tickets are not used after a designated period of time-generally 3 to 4 months,"<<endl; cout << "you will receive credit for the purchase price of the original lost ticket."<<endl; break; default : cout << "Error! That was an invalid entry."<<endl; } while(faq_choice!=0); return 0; }
and this is the compiler's message:
1>------ Build started: Project: leish, Configuration: Debug Win32 ------
1>Compiling...
1>WHYYme.cpp
1>c:\users\fofa\documents\visual studio 2005\projects\leish\whyyme.cpp(103) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\fofa\documents\visual studio 2005\projects\leish\whyyme.cpp(6)' was matched
1>Build log was saved at "file://c:\Users\fofa\Documents\Visual Studio 2005\Projects\leish\Debug\BuildLog.htm"
1>leish - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
plz help!
•
•
Join Date: Nov 2008
Posts: 32
Reputation:
Solved Threads: 1
you got several errors in your code .
1- in int faq_choice,faq_YN;
y did u make faq_YN integer it have to be char that is why the infinite loop occurs.
2- in your if statements u made && it should be || cuz when making && the resulting of the if statement will always be false and wont enter body of the if statement.
3-in the switch statement y did u put faq_YN as its condition
it should be faq_choice .
4-there are other errors but sorry i have no time to state it but it wont make A difference in the program ,hope u find them by yourself.
hope that my corrections are right.
1- in int faq_choice,faq_YN;
y did u make faq_YN integer it have to be char that is why the infinite loop occurs.
2- in your if statements u made && it should be || cuz when making && the resulting of the if statement will always be false and wont enter body of the if statement.
3-in the switch statement y did u put faq_YN as its condition
it should be faq_choice .
4-there are other errors but sorry i have no time to state it but it wont make A difference in the program ,hope u find them by yourself.
hope that my corrections are right.
Last edited by Ahmed_I; May 31st, 2009 at 4:10 pm.
Take a look at the corrected code and at Ahmed_I's post 

#include <iostream>
using namespace std;
int main ()
{
int faq_choice;
char faq_YN;
cout << "\t\t\t ================= "<<endl;
cout << "\t\t\t || || || || "<<endl;
cout << "\t\t\t || || || || "<<endl;
cout << "\t\t\t || || || "<<endl;
cout << "\t\t\t \\ || || "<<endl;
cout << "\t\t\t \\ || "<<endl;
cout << "\t\t\t \\ || "<<endl;
cout << "\t\t\t \\|| J-Otaku-Air "<<endl;
cout <<endl;
cout <<endl;
do
{
cout << "Welcome to the Frequently Asked Questions (FAQ) area."<<endl;
cout << "Bellow is a list of frequently asked questions."<<endl;
cout << "Choose the number of the required quest then press Enter to show the answer."<<endl;
cout <<endl;
cout <<endl;
cout << "Q1. Should I reconfirm my flights, hotel or car reservations?"<<endl;
cout << "Q2.What happens if the airline has changed my flights?"<<endl;
cout << "Q3.Do you deliver tickets to other countries?"<<endl;
cout << "Q4.Do you deliver tickets to a hotel/business or alternate place"<<endl;
cout << "other than my home?"<<endl;
cout << "Q5.What if my tickets are lost or stolen?"<<endl;
cout <<endl;
cin >> faq_choice;
cout <<endl;
cout << "Are you sure you want question number "<<faq_choice << " ?(Y/N)"<<endl;
cin >> faq_YN;
cout <<endl;
cout <<endl;
if ((faq_YN=='N') || (faq_YN=='n'))
{
cout << "If you are not happy with your choice, then please choose another question"<<endl;
}
if ((faq_YN=='Y') || (faq_YN=='y'))
{
cout<<"Here is the answer."<<endl;
}
switch (faq_choice)
{
case (1):
cout << "Travelers are advised to contact the airline, hotel or car rental company"<<endl;
cout << "at least 72 hours prior to departure."<<endl;
break;
case (2):
cout << "If the airline changed or cancelled your flights, the airline must assist you."<<endl;
cout << "J-Otaku Air did not change the flights. The airline did,"<<endl;
cout << "thus the airline must fix your itinerary and/or ongoing travel."<<endl;
break;
case (3):
cout << "Yes, we deliver tickets to other countries."<<endl;
cout << "Delivery is via electronic ticketing for claiming at the airport ticket counter,"<<endl;
cout << "or paper ticket via courier. Our booking engine will advise you as to the form "<<endl;
cout << "of delivery for the flights that you have chosen."<<endl;
break;
case (4):
cout << "Yes, we deliver tickets to your hotel/business or office or any alternate address"<<endl;
cout << "where a courier may get signature for delivery of the package. "<<endl;
cout << "Postal office boxes (PO Boxes) are not allowed. "<<endl;
break;
case (5):
cout << "If your paper airline tickets are lost or stolen, please contact us or call us immediately."<<endl;
cout << "If your original tickets are not used after a designated period of time-generally 3 to 4 months,"<<endl;
cout << "you will receive credit for the purchase price of the original lost ticket."<<endl;
break;
default :
cout << "Error! That was an invalid entry."<<endl;
}
} while(faq_choice!=0);
return 0;
} Last edited by tux4life; May 31st, 2009 at 5:26 pm.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
![]() |
Similar Threads
- Fatal Error (Windows NT / 2000 / XP)
- Help: I am getting a Windows InstallShield fatal Error 1603 (Windows NT / 2000 / XP)
- Fatal Error message (blue background) and a Red Circle with an exclamation mark (Viruses, Spyware and other Nasties)
- Fatal error in Ie has occured (Viruses, Spyware and other Nasties)
- Fatal Error, c0000005 Memory could not be read??? (Windows NT / 2000 / XP)
- Fatal Error Message When Accessing A Web Page (Windows NT / 2000 / XP)
- Fatal Error C010? (C)
- fatal error C1010 (C++)
Other Threads in the C++ Forum
- Previous Thread: sudoku c++ help :D
- Next Thread: the "while (condition) wont work.
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete deploy desktop developer directshow dll download dynamic encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node number output parameter pointer problem program programming project proxy python read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






