RAD Studio
ContentsIndex
PreviousUpNext
E2255: Use :: to take the address of a member function

If f is a member function of class c, you take its address with the syntax

&c::f

Note the use of the class type name (not the name of an object) and the :: separating the class name from the function name. 

(Member function pointers are not true pointer types, and do not refer to any particular instance of a class.)

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!