title: How can I use an else if statement to compare letters and make it case insensitive?
body: <p>So I have this block of code here:</p>
  
  <pre><code>string answer1;
  
  answerQues1:    
      cout &lt;&lt; "So, A, B, C or D?";
      cin &gt;&gt; answer1;
  
       if (answer1 == "A" | answer1 == "a")
          {
              cout &lt;&lt; "It's the right answer, you have " &lt;&lt; char(156) &lt;&lt; "100!" &lt;&lt; endl;
              PlaySound(TEXT("C:/Users/user/Downloads/Millionaire/£100correct.wav"), NULL, SND_FILENAME | SND_ASYNC );
              Sleep(2000);
          }
  
      else if (answer1 &gt;= "E" | answer1 &gt;= "e") //FIX THIS, IT'S ONLY ACCEPTING CAPITALS NOT LOWERCASES.
          {
              cout &lt;&lt; "Whoops, you've entered an incorrect option! Remember, only A, B, C or D are acceptable." &lt;&lt; endl;
              answer1.erase();
              goto answerQues1;
          }    
  
       else
          {
              cout &lt;&lt; "I'm very sorry, it's an early exit for you - it's the wrong answer! You leave with nothing!" &lt;&lt; endl;
              PlaySound(TEXT("C:/Users/user/Downloads/Millionaire/£100and£64000lose.wav"), NULL, SND_FILENAME | SND_ASYNC);
              Sleep (4000);
              PlaySound(TEXT("C:/Users/user/Downloads/Millionaire/gameOver.wav"), NULL, SND_FILENAME | SND_ASYNC);
              cout &lt;&lt; "Thanks for playing! Press any key to exit the game" &lt;&lt; endl;
              system("pause");
              return 0;
          }
  </code></pre>
  
  <p>The else if statement checks if the answer is greater or equal to the letter E, since only A, B, C or D are acceptable. It then displays a message telling the user, deletes the value of answer1, and then goes back to the input section, essentially making an loop. However, when I enter an incorrect option such as E and immediately enter a acceptable one such as B  it does not accept B as a wrong answer and instead of going to the else statement, it goes to the else if ONLY IF THE ANSWER IS LOWERCASE. But if I typed B in capitals, it treats it as wrong and goes to the else statement as it should. Is there anyway I can fix this so it will detect upper and lowercase letters? Many thanks.</p>