I'm experimenting with writing to files and I've created a loop that simple continues to accept user input until a key word is used then it ends the loops and the file is saved and closed etc.
However when I open the file there's no spaces in it. Is there a way I can stop the system from removing the spaces?
That's because your using cin >> on a string. It extracts input until a space or newline. If the user puts a space in their string, only the first part is read. Do this instead: