經安全檢測,此網站為安全網站,請放心前往原始網址!

Calling C++ class methods via a function pointer - Stack Overflow

How do I obtain a function pointer for a class member function, and later call that member function with a specific object? I’d like to write: class Dog : Animal { Dog (); void bark (); } … Dog* pDog = new Dog (); BarkFunction pBark = &Dog::bark; (*pBark)

stackoverflow.com

網址安全性掃描由 google 提供