Method pointers and inheritance

This is a discussion on Method pointers and inheritance within the C++ Programming forums, part of the General Programming Boards category; I came across a scenario where I need to register class methods from a subclass, however the calls to Register ...

hmm after a quick bit of research, I've found you can't actually do this, then I found a whole bunch of stuff I NEVER wanted to know about pointer-to-member-functions (i.e. depending on platform, inheritance, virtual-ity, etc they can be anywhere from 4 to 16 bytes!)

Happily there is a way around this. before I show you the code, I'll briefly explain the pros and cons of my method
Pros:
- it's way more flexible. you can pass ANY method of a class, even ones that require arguemetns.

cons:
- it requires boost::bind. you should have this installed anyway, so view this as an oppurtunity.
- it's a little more complicated
- there's a slight runtime cost.