Hello,
This is a working peice of code but couldn't explain how it woks.
I'v 2 questions at this pointCode:struct stA { ... int data; ... } ; struct stB { ... int fields; struct stA *stA_ptr; ... }; main() { struct stB *stB_ptr; // i could see a statement like stB_ptr->stA_ptr[8].data=1500; ... }
stA_ptr is just a pointer to structure stA.
1. Then what does stA_ptr[8] imply ?
2. How is it possible to access the element "data" in stA using stA_ptr[8].data ?
I hope "stA_ptr[8]->data" should be the correct form but still its working.
Hope to get a reply soon