title: How to check if a string contains punctuation c++
body: <p>I am attempting to iterate over a string to check for punctuation. I've tried to use ispunct() but am receiving an error that there is no matching fucntion for call to ispunct. Is there a better way to implement this?</p>
  
  <pre><code>for(std::string::iterator it = oneWord.begin(); it != oneWord.end(); it++)
  {
      if(ispunct(it))
      {
      }
  }
  </code></pre>