C++ inheritance and member function pointers

前端 未结 8 772
忘了有多久
忘了有多久 2020-12-03 00:58

In C++, can member function pointers be used to point to derived (or even base) class members?

EDIT: Perhaps an example will help. Suppose we have a hierarchy of t

8条回答
  •  失恋的感觉
    2020-12-03 01:02

    You might want to check out this article Member Function Pointers and the Fastest Possible C++ Delegates The short answer seems to be yes, in some cases.

提交回复
热议问题