I am working on a class that only has one function that is public and that is the initial call for the end-user. The initial call for the end user would be, for example:
1 2
|
MyClass myclass;
myclass.initfunction(AfterOutput);
|
where initfunction prototype would be
|
void MyClass::initfunction(void (*func)());
|
and AfterOutput parameter would be a function.
I have a private prototype as follows:
My issue is, for the life of me, inside initfunction I cannot seem to properly do
which would allow the private internals of MyClass to run the AfterOutput function. How would I go about doing this? I hope I have worded this question effectively and properly. If you need me to, I can post the entirety of the code.
This wouldn't be an issue if the class was defined inside the same source file, however, the class is prototyped and defined separately inside a header file.
EDIT: Sorry for the post. I was assigning func to pFunc to far down in the code and it wasn't being assigned before a loop hit. Had to walk away for a minute to see that.