+ 1
How do we acces a member of a pointer structure which is also inside a structure?
Its like this structure { *pointerStructure { member; } } https://code.sololearn.com/cwBj0pQkgdyV/?ref=app
2 Antworten
+ 2
Your parentMem is not pointing to an actual 'child' when it's initialized, you have to allocate some memory for it first like:
mother.parentMem = (struct child*)malloc( sizeof( struct child ) );
And include stdlib.h
+ 1
Dennis you really helped me, thanks a lot.