title: switch case on char*
body: <p>It is a piece of code that gives me error:</p>
  
  <pre><code>const char* name = pAttr-&gt;Name(); // attribute name
  const char* value = pAttr-&gt;Value(); // attribute value
  
  switch(name) // here is where error happens: must have integral or enum type
  {
  case 'SRAD':    // distance from focal point to iso center
      double D = atof(value);
      break;
  case 'DRAD':    // distance from iso center to detector
      break;
  default:
      break;
  }
  </code></pre>
  
  <p>The <code>switch(name)</code> is where error happens. It says it m<strong>ust be a integral or enum type</strong>. So how do I do switch case, or equivalent, on a <code>char*</code> type?</p>