Advertisement

what error is this?

Started by March 21, 2002 04:49 PM
1 comment, last by Mage_gr 22 years, 7 months ago
error C2447: missing function header (old-style formal list?) It came from this function: int game(); { int first; cout<<"You are in a locked room full of stores for the soldiers of the base.\nWhat are you going to do?Enter a number.Enter 1 in order to try to force the door.\nEnter 2 in order to try to go through the ventilation.\nEnter 3 in order to pretend to be ill and call for the guard to check.Enter:"; cin>> first; switch(first) { case 1:cout<<"The door is made of titanium and has a really tuff lock.You don''t think you can open it.GAME OVER"; break; case 2:cout<<"Yeah that''s it you made it through the ventilation.Thank god you were on a diet before you were captured."; break; case 3:cout<<"Nope.Didn''t work.The guard understood your trick and started laughing.You must try something else.GAME OVER"; break; default:cout<<"Wrong number"; } return first; }
When you see a roller coaster, get on it,put your hands in the air,and ride it to the very end.Life doesn't remember you unless you kick,scream,and claw your way to the top.There is nothing in the world that is impossible.If you believe that you can do it, you will.
See that little semicolon after int game()? Lose it.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Advertisement
yes yes yes sorry that was a really silly question my mistake sorry sorry.........
When you see a roller coaster, get on it,put your hands in the air,and ride it to the very end.Life doesn't remember you unless you kick,scream,and claw your way to the top.There is nothing in the world that is impossible.If you believe that you can do it, you will.

This topic is closed to new replies.

Advertisement