Hi, I'm looking for help writing a program to check an input file for errors in its pattern.
Basically, I've got a file of thousands of lines like this:
"70 20000731 210202 19 36005 354 55.369 -37.207 -54 0.847 491 0.981 0.985 278977"
I have no trouble opening the file and reading the first line into a string called line. What I need is access to the individual integers/floats for a few simple calculations, and also to check that all 14 entries are present.
I'm trying to make a function to which I'll pass the string of the line, which will break it up and perform the checks I need. The big thing I'm missing here is the correct way to parse a string and turn the values into... an array of variables? Or something more efficient I'm not even thinking of?
Thanks for any tips in the right direction. I am running in circles.