Dave's Brain

Browse - Programming Tips - How do I call a pointer to a member function?

Date: 2011jul7
Language: C++

Q.  How do I call a pointer to a member function?

A.  Use this handy macro:

#define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember))

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.