Re: bound pointer to member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-02-23 at 11:54 +0100, Klaus Rudolph wrote:
> OK, maybe a missunderstanding or a wrong naming for my problem...
> 
> What I am searching for is the following:
> 
> class A 
> {
>     void AnyFunc();
> }
> 
> int main()
> {
>    A a1;
>    A a2;
> 
>    ...anyPointerDefinition ptr1;
>    ...anyPointerDefinition ptr2;
> 
>    ptr1= &(a1.Func);
>    ptr2= &(a2.Func);
> 
>    //call the pointers as functions
>    ptr1();
>    ptr2();   
> }

You probably want to use the Boost Function library for this:
http://www.boost.org/doc/libs/1_46_0/doc/html/function/tutorial.html#id1275012




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux