Reading from file to dynamic struct
问题 I would like to read from a file, line by line. Each line has 3 arguments guaranteed. First 2 are first and last name and third is age. I want to make a linked list, in which, each node represents a person (line) in the file. I don't know the size of the names so I made it dynamic. I also don't know the number of lines in the file, so I would like that to be dynamic too. My approach was to use fscanf, but then I wouldn't know how much memory needs to be allocated prior to reading it. The