iterator for map - problem with searching
<p>hello i got an iterator running on a multimap ,my multimap includes two fields the first 1 is the key value which is a string Lastname and the second 1 is the data which is a pointer to an object called Employee.
in my program i need to be able to find an element inside my map using iterator (cause i am trying to find the data by its ID and not by the key value).
i want to have some sort of indicator that will tell me if the element i am looking for is inside my map or not.
thanks in advance.
and this is my Find code :</p>

<pre><code>MultiMap::iterator iterator;
iterator=m_municipalityMap.begin();
bool flag = false;
while(!(flag) &amp;&amp; iterator != m_municipalityMap.end())
{   
    if(strcmp(iterator-&gt;second-&gt;GetId() , id) == 0)
    {   
        flag=true;
        break;
    }
    iterator++;
}
if (flag==false)
    cout &lt;&lt; "could not find Employee"&lt;&lt;endl;

return iterator;
</code></pre>

<p>what i need to know if there is a way to know if the iterator stands on nothing like comparing to NULL on pointers </p>
