View Single Post
Old 10-20-2004, 05:00 PM   #5 (permalink)
bingle
Crazy
 
Location: California
Quote:
Originally Posted by formerScientist
The getline routine is faster than two extractions and a concatination plus the resulting code is cleaner, easier to understand, easier to modify and more robust. More robust because the text file could now easily contain Mr. John P. Doe Jr. on a line and that would be read-in correctly without modifying the code.
That's true, which is why I gave the disclaimer "if you want to stick with the standard stream operator". It seems like a lot of people who ask questions here are doing so for courses and things, and giving them answers they haven't encountered and don't understand yet might do more harm than good. Of course, I have no way of knowing if that's the case for BuddyHawks, but I thought I'd offer an option :-)

Bingle
bingle is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60