error: ISO C++ forbids comparison between pointer and integer
<p>here is some codes that I want to find the desired substring block in a string:</p>

<pre><code>#include &lt;algorithm&gt;
#include &lt;string&gt; 
using namespace std;

...
unsigned int stage = 3;
string::iterator iter = s.begin();
string::iterator iter_next = s.end();

for (unsigned int i=0; i&lt;stage; i++) {

    iter = std::find(iter, s.end(),"#STAGE");

}
    iter_next = std::find(iter, s.end(), "#STAGE");

string sub = string(iter, iter_next);
...
</code></pre>

<p>I chose returning iterator instead of index. However, debug give me this : </p>

<pre><code>error: ISO C++ forbids comparison between pointer and integer. 

c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\include\c++\bits\stl_algo.h:-1: 
In function '_RandomAccessIterator std::__find(_RandomAccessIterator, _RandomAccessIterator, 
const _Tp&amp;, std::random_access_iterator_tag) [with _RandomAccessIterator =   
__gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, 
std::allocator&lt;char&gt; &gt; &gt;, _Tp = char [7]]':
c:\qtsdk\mingw\bin\..\lib\gcc\mingw32\4.4.0\include\c++\bits\stl_algo.h:4224: instantiated  
from '_IIter std::find(_IIter, _IIter, const _Tp&amp;) [with _IIter = 
__gnu_cxx::__normal_iterator&lt;char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, 
std::allocator&lt;char&gt; &gt; &gt;, _Tp = char [7]]'
</code></pre>

<p>Everything is fine when I used index method. I understand it must be a simple mistake but I hope someone can point out.</p>
