I am having trouble compiling the following code. I am usually OK with using callback functions, but it seems that when using a member function, it has issues. Do you know what is the problem with my declaration/definition of the parameter startPlayback?
class VmapPlayer
{
void startPlayback();
void playAdBreak(int a, void (*callback)());
};
void VmapPlayer::playAdBreak(int a, void (*callback)())
{
cout << a << endl;
//callback();
}
void VmapPlayer::startPlayback()
{
playAdBreak(5, startPlayback); // Compile issue with "startPlayback" parameter
}