I have my program successfully writing to text files but when the program starts again, it deletes the text file and begins writing it fresh. I thought a solution would be to have the user input the file name they would like the program to create but I cannot figure out the correct syntax.
any help would be appreciated.Code:cout << "What do you want to call your file? eg. myfile.txt";
char filename[256];
cin >> filename;
ofstream flout('filename');
Thanks!
