I want to pass a function pointer of my function repaint() which is overloaded in 3 versions. I want to pass the one without any arguments:
void repaint()
I tried:
myObject = new Object(&myclass::repaint);
But the compiler says "I don't know which Version to choose". OK.
Then I tried
myObject = new Object(static_cast<void(*)(void)>(&repaint);
Then I got (sorry for the bad translation):
- "invalid operation on an expression of a bound member function"
- "myObject::myObject no overloaded function accepts 3 arguments"
How to pass it correctly?