first i copy an object byte by byte to a memory location .
Then cast starting address of that memory location to pointer of object type and access member function of object using that pointer .
code is very lengthy and split across files ..
so i was avoiding to post it.
gcc compiler is giving following error
10.cpp: In function ‘int main()’:
10.cpp:64: error: request for member ‘display’ in ‘(hen*)henstash.Stash::fetch(j)’, which is of non-class type ‘hen*’
henstash.Stash::fetch(j) is returning a void pointer to memory location where object was earlier copied byte by byte.
hen is class.