void (DLMAP::*fptr[2])(BitStream &theBits);
// set up an array of functions that return void and take a reference
// to a BitStream object as an argument
fptr[1] = &DLMAP::test_function_ref;
// assign the 1'th element of the function pointer array to the address of the function
(*this.*fptr[1])(theBits);
// now, actually call the function using the this pointer
Wasn't that fun? I got the info here.
No comments:
Post a Comment