pointer to one struct in another, writing and reading it from file gives SegFault
问题 I am brushing up my C skills from Learn C The Hard Way, currently I am at 17th Exercise. I am doing the 'Extra Credits' part. Making the database code given on that page to get I am trying to "Change the code to accept parameters for MAX_DATA and MAX_ROWS, store them in the Database struct, and write that to the file, thus creating a database that can be arbitrarily sized" So, I commented out the #define directives, and changed Address and Database structs as given: struct Address { int id;