Home > Back-end >  C read the file
C read the file

Time:10-10

Read a different file format, I need to be able to extract any one of the data fields,
 
format, as shown in the figure to beg god to give directions how to read,

CodePudding user response:

Line read, each a string you string the middle with a space for separators can be taken out

CodePudding user response:

Have to say is, the expression "arbitrary" but how can do,
The format of the file must have certain (or complex or simple)

The host's statement is, read the following two forms of text, and
The first text is
Each row 7 items, the last item may be empty,

For the first text reading method is in accordance with the line read, written to your setting methods, determine the number of data is 6 or 7 ways to determine whether the last item has value,

For the second it is much easier, and according to read lines, each line according to the blank character segmentation,
Can obtain the corresponding item
  • Related