My own signal-n-slot definition
The KjellKod signal-slot mechanism is a C++, cross platform compatible implementation of the Observer design pattern. Signals are basically notifications of an (observable) event. Signals are connected to Slots which each store a function callback to an object. A signal can be connected to many slots and all slots/receivers are notified when the signal is emitted.
A signal can be just a notification, or it can pass along information. This make's it very handy when creating loosely coupled software systems.
The only requirement on an objects function callback that is to be stored within a slot is that it must be able to receive the same argument(s) as the publishing signal is sending. I.e. If it is a void signal, then the slot (stored callback function) must have a zero argument list. Likewise, if the signal sends out an argument, the receiving function must have that argument type, and only that argument in its argument list. If this requirement is not adhered to, the compiler will generate an error message. I.e. signal/slot is typesafe.
Modified below: 2010-08-12
Back when I made KSignals version 1 (dynamic memory) and version 2 (static memory for embedded systems) I had not read GotW_83: Generic Callbacks but I'm still kind of happy that I unbeknowst of much still managed to on my own come up with something very similar, although lacking some of the finer points Herb makes.
Either way I strongly recommend you to read Herbs Gotw article since it's very, very easy read and explains better than any other function callback or function pointer text that I've read how to setup the basics that are needed for Signals and Slots. If you think this is something good, then please go ahead and use my versions and tailor make them as you please (which should be easy since they're only few lines with bare bone code)