Hey, all. Not sure if this should go here or in Beginners. It's probably already been answered, but a quick search found nothing.
Suppose I have the following function:
1 2 3 4
int HandleCallback(int(*callback)(string))
{
return callback(string("he;lp"));
}
Further suppose I have a bunch of other functions of various arities taking all sorts of args, including at least one string. Say,
1 2
int SomeFunction(string, int, bool);
int SomeOtherFunction(string, int);
stuff like that. Is there a simple way of taking those functions, binding every arg except the string to them, and then passing them to HandleCallback()? Or doing something similar with functors? Is this at all what boost::bind was intended for, or am I looking for something else entirely?