using find_if in set
<p>In my main.cpp:</p>

<pre><code>using namespace std;
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;set&gt;
#include &lt;string&gt;
#include &lt;cstring&gt;
#include &lt;sstream&gt;
#include &lt;algorithm&gt;

class findme
{
  public:
    bool operator()(const std::string&amp; s) {
        return s == "tom";
    }
};

int main(int argc, char *argv[])
{
    set&lt;string&gt; myset;
    myset.insert("tom");
    myset.insert("jerry");
    cout &lt;&lt; myset.size();
    set&lt;string&gt;::iterator it;
    if (find_if(myset.begin(), myset.end(), findme())) {
        cout &lt;&lt; "found tom \n";   
    }
    return EXIT_SUCCESS;
}
</code></pre>

<p>when I compiled the program, it got an error:</p>

<p><code>Could not convert std::find_if [with _InputIterator = std::_Rb_tree_const_iterator&lt;std::string&gt;, _Predicate = findme]((&amp;myset)-&gt;std::set&lt;_Key, _Compare, _Alloc&gt;::begin [with _Key = std::string, _Compare = std::less&lt;std::string&gt;, _Alloc = std::allocator&lt;std::string&gt;](), (&amp;myset)-&gt;std::set&lt;_Key, _Compare, _Alloc&gt;::end [with _Key = std::string, _Compare = std::less&lt;std::string&gt;, _Alloc = std::allocator&lt;std::string&gt;](), (findme(), findme()))' to 'bool'</code></p>

<p>Can anyboy tell me where were I wrong? thank you</p>
