View Single Post
Old Apr 9th, 2006, 1:22 PM   #1
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 380
Rep Power: 3 King is on a distinguished road
Question Read in data from a file

I have a text file that looks like this:

88 45 65 67 86
67 45 32 67 33
66 44 81 18 70
55 45 75 26 45
etc...

each numer in a row needs to be added to a different vector. I was gonna use fstream, get each line with the getline function, then use a split method to split up each line, and then sore each field into the apropriate vector... is there an easier way to do this?
__________________
I am Addicted to Linux!
King is offline   Reply With Quote