Good day.

Lets say I have Class A and Class B. Class A have method DoIt() and some variables. And I want that this method DoIt() would be availible at Class B, but only method no variables.

So:
* friend functions wont work there, because it will give me access to var.
* inheritance the same as first.
* static is bad either, because it will be availible to all other classes.

Any ideas how to implement that ?

Thanks for your answers