Then how come my compiler wont run this? Code: #include <iostream> using namespace std; int main () { int name; cout<<"Please input your name: "; cin>>name; cin.ignore(); if ( name < 100) { cout<<"You have a Horrible name!\n"; } else if ( name == 100) { cout<<"YOU ARE MARIO!\n";} { int birthdate; cout<<"PLease enter your birthdate:\n"; cin>>birthdate; cin.ignore(); if ( birthdate != 002507) { cout<<"INVALID. TERMINATION ACTIVATED!:\n"; } else if ( birthdate == 002507) { cout<<"Validated. Opening KEY MAKER:\n"; } cin.get();
Its giving me the '}' at end of input I think I should know this but, its not clicking in my head. And the main never closes?
you mean take a break? I tried fixing it and this is what it looks like. (I am using a bloodshed DEV-C++ compiler Code: #include <iostream> using namespace std; int main () { int name; cout<<"Please input your name: "; cin>>name; cin.ignore(); if ( name < 100) { cout<<"You have a Horrible name!\n"; } else if ( name == 100) { cout<<"YOU ARE MARIO!\n";} { int birthdate; cout<<"PLease enter your birthdate:\n"; cin>>birthdate; cin.ignore(); if ( birthdate != 002507) { cout<<"INVALID. TERMINATION ACTIVATED!:\n"; } else( birthdate == 002507);{ cout<<"Validated. Opening KEY MAKER:\n"; } cin.get()'; and the error message I get is that its missing a terminating charater.
Use code block for codes in the posts. As of now check this line cin.get()'; it should be cin.get(); and then you should add the following as well } this is something that is apparent an error. Also if you get more errors post here and would say how to get them removed.
And now the program isnt working the way I want it to. It compiled alright, but it doesnt work the way I want it to. I dont want it to say "invalid terminating program" and then underneath it say "validated"
Its giving me the '}' at end of input I think I should know this but, its not clicking in my head. And the main never closes? Buy sth cheap, to China Wholesale Mall
can someone help me how to trap keywords in a simple just a simple program.. i have no idea about his.. I'm just a newbie here in C++.. i need some introduction for C++.. hope someone can help me! tnx in advance!