Code:struct TMP *tmp char *buf_ptr; buf_ptr = tmp->tr[i].ch_ptr; tmp->tr[i].ch_ptr = NULL
tmp is a pointer to a struct TMP and tr is another pointer to another struct within tmp.
Thanks
Code:struct TMP *tmp char *buf_ptr; buf_ptr = tmp->tr[i].ch_ptr; tmp->tr[i].ch_ptr = NULL
tmp is a pointer to a struct TMP and tr is another pointer to another struct within tmp.
Thanks
Well, either "tmp" or "tmp->tr" is invalid. Post a compilable example that demonstrates the error.
tmp is uninitialized pointer, it means it contains garbage
so what happens when accessing
is undefined. Anything could happenCode:tmp->tr
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler