title: Else statement crashes when i enter a letter for a cin << int value
body: <p>Alright, I have a question, I veered away from using strings for selection so now I use an integer. When the user enters a number then the game progresses. If they enter a wrong character it SHOULD give the else statement, however if I enter a letter or character the system goes into an endless loop effect then crashes. Is there a way to give the else statement even if the user defines the variable's type. </p>
  
  <pre><code>// action variable;
  int c_action: 
  
  if (c_action == 1){
      // enemy attack and user attack with added effect buffer. 
      ///////////////////////////////////////////////////////
      u_attack = userAttack(userAtk, weapons);
      enemyHP = enemyHP - u_attack;
  
      cout &lt;&lt; " charging at the enemy you do " &lt;&lt; u_attack &lt;&lt; "damage" &lt;&lt; endl;
      e_attack = enemyAttack(enemyAtk);
      userHP = userHP - e_attack;
      cout &lt;&lt; "however he lashes back causing you to have " &lt;&lt; userHP &lt;&lt; "health left "  &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl;
      //end of ATTACK ACTION
  }else{
      cout &lt;&lt; "invalid actions" &lt;&lt; endl;
      goto ACTIONS;
  }
  </code></pre>