Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a file and reading in lines of integers

Status
Not open for further replies.

tcat72

Technical User
Oct 3, 2001
4
US
I am trying to read in a line of integers. The file is like this:

4
3
0 0 1 0
0 1
2 3
3 4
4 0

the first two #s are fine, but lines 3-7 are giving me problems. How can I read each # in line 3 individually and perform some stuff on it, then continue to read the rest of the numbers and doing some stuff to them as well until I reach the end of the line? How can I do the same thing to the remaining lines?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top