I am trying to read the contents from a file, while counting the amount of lines of the same. The input would be something like this:
1 2 3
17 18 19 10
28 92 10
24 59 90 09
Although the actual file would contain lines long hundreds of characters, and could have hundreds of lines. I can already read the contents themselves, with the below method:
But the above cannot detect newlines. I know how to count the lines themselves, but I need to know when they reach the newline, so I can access the next member of DesignVector, as above. Thanks for the help.