what error is this?
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;
}
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!
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement