I have to make a program that asks for your username (any)to register it. When you type it it will say something. I want to create a txt file also. so this is what I have:
the file must already exist in the same directory has the rest of the project files, there are parameters you can pass too to either start at the beginning of the file, append the content to the actual content of the file, or ios::trunc to delete the previous content of the file... default is beginning of file.