Using fgets() and strtok() to read in a file line-by-line in C?
问题 I'm trying to use fgets and strtok() to read in a file line by line, and create a linked list of each different line of information. Right now, I'm only just putting the information into an array, just to try to figure out how to read the information in correctly, but it's not working right. In the while(fgets) portion, it seems to load everything into the array properly, and prints it out. However, after that loop has executed and I try to print out the whole array, I get really weird