malloc and free with a dynamically changing structure
问题 I am having trouble with moving my pointer in a dynamically changing structure. I have created my code where you can malloc more memory and this seems to be working. The problems that I am running into is how to add to the structure, how to free memory and how to move from structure to structure and print all items. I am trying to test add and print (the delete function that is there does not seem to work, segfaults) When I add to the struct and then print the struct I get a segfault from the