Boost logo

Boost Users :

Subject: Re: [Boost-users] [Signals2] connecting signals and pointers to objects
From: Igor R (boost.lists_at_[hidden])
Date: 2009-09-07 17:20:41


> void Function_object::slot_func(char c)
> {
>  cout << "Hurrah, I received char c: " << c << endl;
> }
>
> void Function_object::run()
> {
>  Base* my_base_pointer = new Derived();
>  my_base_pointer->connect(boost::bind(&Function_object::slot_func, \
>      this)); // Here I get errors from the Boost.Signals2 headers

my_base_pointer->connect(boost::bind(&Function_object::slot_func, this, _1));


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