Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::bind
From: Max (loadcom_at_[hidden])
Date: 2009-02-06 03:43:52


> I have a problem using boost::bind (version 1.34.1). I don't know whot I
> make wrong but I think that I can use it in my case. Or I'm wrong?
>
> I use VS2005.
>
> in some external header file I have the declaration
>
> typedef void (* FUNCTION)(int ,void *);

try with
typedef boost::function<void (int ,void *)> FUNCTION;

> void SetCallback(FUNCTION cb);
>
>
>
> Now I want to call a function inside my class. Maybe with bind?
>
> I have tested the following:
>
>
SetCallback(boost::bind<void>(boost::mem_fn(&Program::OnCallback),this,_1,_
> 2));
>
> but this does not work..have anyone an hint how I can do that?

B/Rgds
Max


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net