I wrote a class that represents a gui window. When an event occurs in the window, like mouse input, what is the C++ way of notifying code outside the class of the event? Currently I use function pointers, which I understand now is the C way of doing it.
Well I use the WINAPI directly so there are no slots and signals, just the window procedures. I want to implement an event system without relying on other libraries.
Well, if you're wanting to go it alone, you could possibly switch from callback functions to callback interface (or "interface") classes? (see "example" below...) But that doesn't address how you hook-up and route the events. That might lead you to implement your own version of signals and slots, I guess.
And delegates are also something to consider; the version that started off life as Boost.Function and made it into TR1 is now part of C++11, as std::function. http://en.cppreference.com/w/cpp/utility/functional/function
(couldn't spot a cplusplus.com ref?) And there is quite a bit of forum (etc) chatter about fast C++ delegates, e.g.