segmentation fault (core dump) while loading a file [duplicate]
问题 This question already has an answer here : Core dump while loading a file (1 answer) Closed 6 months ago . I am trying to create a function which loads data from a .txt file but when it runs I always get a segmentation fault(core dumped) error. The file contains an unknown number of lines while each line has a string and an integer separated by tab.The list_create function just creates a data structure. The while loop in the end deletes the data structure, I did not include the code because I