title: Hexadecimal Value In C++ Switch Statement
body: <p>Is it possible to perform a switch with a hexadecimal case statement?</p>
  
  <p>for example:   </p>
  
  <pre><code>switch (integer) {
      case: 1
           function();
           break;
      case: F:
           function();
           break;
  }
  </code></pre>
  
  <p>g++ complains saying:</p>
  
  <pre><code>example.cpp: In function ‘int main()’:
  example.cpp:148:18: error: ‘F’ was not declared in this scope
  </code></pre>
  
  <p>I assume the compiler is  trying to treat <code>F</code> as a variable. I know instead of <code>F</code> I could just use the value <code>15</code> but hex would be more convenient.</p>
  
  <p>Solutions for other control statements would be nice too.</p>