I am experiencing problems with a program that involves alot of structures and pointers, i think i have narrowed my problem down to an issue with ether assigning or referencing struct memebers...
if I have:
if im in a situation where i have to fill the memeber value of struct TWO with x, but i can only directly acces struct ONE, is this not the proper procedure..?Code:struct ONE{ struct TWO* two_pointer; }; struct TWO{ int value; };
Code:struct ONE* one_p=(struct ONE*)malloc(sizeof(struct ONE)); struct TWO* one_p->two_pointer=(struct TWO*)malloc(sizeof(struct TWO)); one_p->two_p->value=x;