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.
|