Another approach that requires just one disk file is opening the file for reading and read its entire contents into memory (storing it in a vector<string> for instance), then closing the file and...