My earlier code which was giving error: complete implementation here: https://ideone.com/MuOmlS
This Code giving error as:
correct code after referring this thread https://stackoverflow.com/questions/12466055/field-has-incomplete-type-error/12466219 i implemented and it worked but from this thread i couldn't able to understand why pointer object is doing which leads to removal of error? complete implementation here: https://ideone.com/SSVnOU
UPDATE: After referring some blogs i came to know there is also an another way of handling this case
I Believe i am missing some concept of c++ language which i need to know to understand what's going on here. Please share your views regarding this.