Thread: How Would I Do This

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    114

    How Would I Do This

    How Would i Get It To Lets SAy
    Code:
    while(game == 1)
    {
         cin >> input;
         if(input == "use")
         {
               if(check == "torch")
              {
                    Code here
              }
               else
              {
                      code here
               }
          }
         if(input == "take")
          {
       
                if(check == "barrel")
                {
                       Code here
                 }
                 else if(check == "cheese")
                 {
                        code here
                 }
                 else
                 {
                        code here
                  }
           }
    }
    check is the result of seeing wat is typed after the "take" input is typed
    so if the user types take barrel how would i get the program to find out they typed barrel after it


    How would i get it to check wat they typed after the take?
    Last edited by Nathan the noob; 02-06-2009 at 12:53 PM.

Popular pages Recent additions subscribe to a feed