I want to implement a class in c++ that has a callback.
So I think I need a method that has 2 arguments:
The Observer design pattern seems to be what you're looking for.