#include "stdio.h" class myclass { public : void f ( int ) ; void g ( int ) ; void h ( int ) ; void i ( int ) ; } ; void myclass :: h ( int a ) { printf ( "%d", a ) ; } int main ( void ) { myclass myclassinstance ; myclass * myclassinstancepointer = & myclassinstance ; void ( myclass :: * pointertofunction ) ( int ) = & myclass :: h ; // this means that pointertofunction is a pointer (*) to a function existing in the scope of myclass (myclass ::) // and takes an int as input ( (int) ) and gives void as output ( void ) ( myclassinstance . * pointertofunction ) ( 1 ) ; // calls the function pointed to by pointertofunction and existing as a member of the class myclassinstance with 1 as the parameter ( myclassinstancepointer -> * pointertofunction ) ( 2 ) ; // calls the function pointed to by pointertofunction and existing as a member of the class pointed to by myclassinstancepointer with 2 as the parameter }