J
John Black
I have the following code trying to use bind1st,
class C1{
...
};
class C2{
...
};
class util{
static bool isSame(C1*, C2*);
};
int main(){
vector<C2*> c2s;
C1* c1;
...
vector<C2*>::iterator itr = find(c2s.begin(), c2s.end(),
bind1st(mem_fun(util::isSame), c1);
);
But my compiler complains syntax error in calling bind1st, do you see
anything wrong?
Thanks.
class C1{
...
};
class C2{
...
};
class util{
static bool isSame(C1*, C2*);
};
int main(){
vector<C2*> c2s;
C1* c1;
...
vector<C2*>::iterator itr = find(c2s.begin(), c2s.end(),
bind1st(mem_fun(util::isSame), c1);
);
But my compiler complains syntax error in calling bind1st, do you see
anything wrong?
Thanks.