Comparing String Iterator to Char Pointer
<p>I have a const char * const string in a function.
I want to use this to compare against elements in a string.</p>

<p>I want to iterate through the string and then compare against the char *.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;cstring&gt;

using namespace std;

int main()
{

  const char * const pc = "ABC";
  string s = "Test ABC Strings";

  string::iterator i;

  for (i = s.begin(); i != s.end(); ++i)
  {
    if ((*i).compare(pc) == 0)
    {
      cout &lt;&lt; "found" &lt;&lt; endl;
    }
  }
</code></pre>

<p>How can I resolve a char* to resolve against a string iterator?</p>

<p>Thanks..</p>
