How do I parse an input file in two parts?
I need to parse an input file such as this in two parts..this is just an example file the file can vary but is very similar
Short simulation
5
2
S
45
35
1 30
5 35
3 45
1 60
1 90
END
I want to parse this first and take in these values
Short simulation
5
2
S
45
35
and the second half i want to parse separately
1 30
5 35
3 45
1 60
1 90
END
Re: How do I parse an input file in two parts?
What did you try? Break the problem down, and describe which part exactly are you having trouble with as there can be a great number of things (reading, writing, parsing?)
Re: How do I parse an input file in two parts?
reading the file...i can read the entire file but i don't know how to parse it in two parts
Re: How do I parse an input file in two parts?
To make it clearer I want to take in the first half of the file input separately from the second half and take in the second half of the file input separately
Re: How do I parse an input file in two parts?
You want to discuss it theoretically or you want to implement it or YOU WANT US TO IMPLEMENT?