
11 May
2010
11 May
'10
3:19 p.m.
On 11/05/2010 17:08, Igor R wrote:
I have 2 functions like:
struct obj {
void foo() { };
void bar() { };
}
How would I store this in a variable ... so that I can call the function via the variable later...
using boost::function; using boost::bind; obj o; // NOTE that "o" will be copied function
callFoo = bind(&obj::foo, o), callBar = bind(&obj::bar, o); callFoo(); callBar();
Thank you, Igor.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users