need a help

how can i make a program that reads from an input file as following :

the input file contains TWO lines: the first line contains length of the ladder , the number of steps in the ladder (maximum 99) and the number of bulbs (maximum 6) to be replaced. The second line contains the height

and this is a part of the input file:

3.54 9 2
216 383
1.98 14 6
150 376 599 303 553 358

as you can see ..the number of height values varies in each second line

and i have to read each height(of the bulb) and check some conditions..then move to the next height at the same line and so on
so.. how can i read each height alone and work on it and then go to the next height???
Last edited on
You should read a whole line with std::getline and then extract each value.
Topic archived. No new replies allowed.