6
class A
{
   bool OutofRange(string& a, string& b, string c);
   void Get(vector <string>& str, string& a, string& b);
}

void A::Get(vector <string>& str, string& a, string& b)
{
   str.erase(
            std::remove_if (str.begin(), str.end(), BOOST_BIND(&A::OutOfRange, a, b, _1)),
            str.end()
            );
}

次のようなエラーが表示されます。

 Error 7 error C2825: 'F': must be a class or namespace when followed by '::' File:bind.hpp
 Error 8 error C2039: 'result_type' : is not a member of '`global namespace'' t:\3rdparty\cpp\boost\boost-1.38.0\include\boost\bind.hpp 67 

誰かが私が間違っていることを教えてもらえますか?

4

1 に答える 1

14

A::OutOfRange は 4 つの引数の関数です - 暗黙 *これは最初の引数であり、bind 句にありません

于 2009-11-11T14:58:11.433 に答える