std::numeric_limits<std::streamsize>::max() is a special value that means we don't care how many characters are extracted, get rid of all of them. Usually you'd put the number of characters you want to extract here.
'\n' is a delimiting character, which tells you when to stop extracting characters from the stream.