Hi,
In my book, it says that a structure can be accessed in two ways. For example i have a structure:
I can access data member with sample.data or if i have a pointer to the structure, i can go like sample->data. But if i have this line:Code:struct sample { int data; struct sample *nextPtr; };
what does it mean? Why brackets around it? Why can't i replace it with sample->data ? They're both pointers.Code:( *sample )->data;
thnx