title: C++ switch statement doesn't let me use more than one "or"? What?
body: <p>This is really weird. So I have this simple switch-case statement that's supposed to perform actions if the user types in a capital OR lowercase version of a letter: </p>
  
  <pre><code>switch (choice)
  {
  case 'A' || 'a':
      cout &lt;&lt; "hello"; break;
  case 'B' || 'b':
      cout &lt;&lt; "hello"; break; 
  case 'C' || 'c': 
      cout &lt;&lt; "hello"; break;
  case 'D' || 'd': 
      cout &lt;&lt; "hello"; break; 
  }
  </code></pre>
  
  <p>MS Visual Studio is giving me three errors for cases 'B'/'b', 'C'/'c', and 'D'/'d' that each say the following:</p>
  
  <pre><code>IntelliSense: case label value has already appeared in this switch 
  </code></pre>
  
  <p>It does NOT give me this error with 'A'/'a' - and if I get rid of case A, it allows case B but not the following cases. I can't think of any reason why it should be fine with the first "or" case, but then get upset at the following cases. </p>
  
  <p>Context: writing a container class and this code is outside the main function but I don't think that has anything to do with it.</p>
  
  <p>Any thoughts? And if it's not allowable in C++, is there a better way to include multiple choices for one case? </p>