c - strncpy issue
- by Joe
Hi there,
I am getting segmentation fault when using strncpy and (pointer-to-struct)-(member) notation:
I have simplified my code. I initialise a struct and set all of it's tokens to an empty string. Then a declare a pointer to a struct and assign the address of the struct to it.
I pass the pointer to a function. I can print out the contents of…