Hey all. I'm working on an implementation of a d20 character (think Dungeons and Dragons, but more general purpose), and for my implementation of feats, I've created a feat class, with a series of function pointers to represent events that feats might effect (getting skill bonuses, calculating crit damage, etc). Each instance then sets these to various functions.
Anywho, part of the code loops through an array of feats, and calls the particular "event" for each feat in the array. Anywho, this is obviously causing problems, as feats which don't set EVERY function-pointer are crashin the program. So, what I need is a way of testing whether a function-pointer is null/empty/unset.
Can anyone help me out??