1 #include "PointerToMember.h"
6 namespace PointerToMember
18 cout
<< "func called, this->num = " << this->num
<< endl
;
22 int Test::* ptr_num
= &Test::num
; // Pointer to a field of 'Test'.
23 void (Test::* ptr_func
)() = &Test::func
; // Pointer to a method of 'Test'.
26 void PointerToMember::tests()
29 Test
* pt
= new Test
{ 420 };