I have a .txt file like this:
(A+B-C+6-8)
(A*5+4)
And I want to read each line as a string and put them in a string array. For example, str[10] would have the string "(A+B-C+6-8)" as its elements. Then I would do something with the array, then when I'm finished and there would be a new line, the array would reset and store the next line of strings.
What function should I use? fgets
? fgetc
? fscanf
? I'm really confused with all these I/O functions. Thanks!