By default getline() reads until a newline. You can specify an alternative termination character, but EOF is not itself a character so you cannot ...
stackoverflow.com