title: check if a char is a single quote. c++
body: <p>I want to check if a char is a single quote.
  Here is my code.</p>
  <pre><code>char mychar;
  if (mychar == '\'')  // Is that how we check this char is a single quote?
  {
    cout &lt;&lt; &quot;here is a quote&quot; &lt;&lt; endl;
  }
  </code></pre>