View Single Post
  #4 (permalink)  
Old 08-03-2007, 05:36 PM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 616
iTrader: (0)
Lee is just really niceLee is just really niceLee is just really niceLee is just really nice
Just found this bit of code:
Quote:
string str;
getline(infile,str); // Get the frist line from the file, if any.

while (infile) { // Continue if the line was sucessfully read.

// do somethin with str here

getline(infile,str); // Try to get another line.
}
I edited it to put 1 example of your code in, i think if you was to test this you would find its what you want, at least i hope.

Hope it helps somewhat,
Lee.
Reply With Quote
The Following User Says Thank You to Lee For This Useful Post:
HelloWorld (08-03-2007)