Anyone?
Anyone?
You'll need to store each line of data processed with getline into a container of some kind (std::vector perhaps) or concatenate each line into another std::string which will store everything the user is typing and not just the last line entered. You'd then output this string object or iterate through the container and output each individual string to the file.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens