You still haven't provided the definition of Widget, so its hard to help. From the error message I would guess, that you have two putString functions in Widget, and hence the compiler is unable to resolve which one to take.
As an alternative approach, apart from a functor (function object) you could also use the listener concept (i.e. observer pattern).
Bookmarks