Quote Originally Posted by Cambalinho View Post
events a();
a={ cout << "hello world";};

(in other place we can change what a do)
Have you considered making "a" a function object (functor), and not just a plain function? A function object would encapsulate any behaviour you want, including changing .

Regards,

Paul McKenzie