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