Q
quigstah
Hey All:
Any insight you could give me would be tremendously appreciated.
I have a data structure, one element of which takes the form:
struct.struct.ptr
Where ptr is a pointer to a struct. I initialize that ptr to NULL in
main(), and then pass the pointer as such to another function for
initialization:
init(struct.struct.ptr);
The init() prototype is as such:
init(mytype_t *ptr);
Clearly I'm doing something wrong: while ptr is correctly initialized
in init(), when I try to use it back in main() it's still NULL. How do
I correctly pass ptr such that it is properly made available after
initialization?
Thanks!
Regards,
John Quigley
Any insight you could give me would be tremendously appreciated.
I have a data structure, one element of which takes the form:
struct.struct.ptr
Where ptr is a pointer to a struct. I initialize that ptr to NULL in
main(), and then pass the pointer as such to another function for
initialization:
init(struct.struct.ptr);
The init() prototype is as such:
init(mytype_t *ptr);
Clearly I'm doing something wrong: while ptr is correctly initialized
in init(), when I try to use it back in main() it's still NULL. How do
I correctly pass ptr such that it is properly made available after
initialization?
Thanks!
Regards,
John Quigley