Archived

This topic is now archived and is closed to further replies.

what error is this?

This topic is 5745 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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; }

Share this post


Link to post
Share on other sites