I have a struct as follows, with a pointer to a function called \"length\" that will return the length of the chars member.
typedef struct pstring_t { ch
The pointer str is never allocated. It should be malloc'd before use.
str
malloc