contents of file 1
graham crackers; 2 squares 59
milk chocolate; 1 bar 235
cheese, swiss; 1 oz 108
marshmallows; 1 cup 159
i need to read in the first part as a string until the ";"
(string; double string double)
then the next file is a little different
contents of file 2
S'mores
2
4 squares graham crackers
1 bar milk chocolate
2 large marshmallows
how do you read the first 2 lines differently from the rest
What exactly do you mean?
If your goal is to read them differently, why don't u just do so?
You could for example write an algorithm that applies only for the first two reads of the file.
You also don't have to process the input of the file, as soon as you get it.
You can for example read the entire file, store it in a string, and then process it.
i need to read in the first part as a string until the ";"
There you have it!
For example, define an array[size_us], use member 'seekg(x)' in a loop.