Using operator keyword in a switch statement : <p>So I am trying to use the "operator" keyword in this switch statement but when I do I get the error "error: expected type-specifier before â:â token operator:"
I am not getting any error for the digit keyword. Any ideas?</p>

<pre><code>for (i=0; i &lt; pf.length(); i++)
  {
    int opn1;
    int opn2;
    int result;
    char token = pf[i];
    switch (token)
      {
         digit:
          {
           chast.push(token); break;
          }
         operator:
          {
           opn2 = chast.top();
           chast.pop();
           opn1 = chast.top();
           chast.pop();
           result = evaluate(opn1, token, opn2);
           chast.push(result);
           break;
          }
      }
  }
</code></pre>
