Pointer syntax

From vegard.wiki
Revision as of 07:42, 29 January 2020 by Vegard (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Pointer to member

Declaration:

member_type type::*member

Dereference:

type obj;
obj.*member
type *obj;
obj->*member

Pointer to member function

Declaration:

return_type (type::*member)(args...))

Dereference:

type obj;
(obj.*member)(args...)
type *obj;
(obj->*member)(args...)