My program crashes when I try to assign a string value to a member of a structure. My suspicion is that the member (of type string) within the structure was never properly alloc
In C++ use 'new' instead of 'malloc'. Using malloc does not run the constructor of your class, so the string is not initialized.