Ok so i have some code that outputs stuff to the screen but everytime i open the program it overwrites the current text file erasing everything that was saved in it. How do i make it so that it just checks to see if there is anything in the file and write the new stuff to a new line?
I dont have any code atm sorry.
Oh and how would i make the code let the user save the file anywhere on there computer? like when your in notepad or something and you click save as, it lets you choose the directory to save it, thats what i want to do. and is there code to create folders too?
To let a user determine where to save the file, you'll have to get them to enter the path of the desired location in the console, save that as a string and then replace "Somefile.txt" with that string in the example above. If you want the "Save as" dialogue in windows, you'll need to write a windowed program in Win32 and consult the Win32 reference pages.
No i remember saving to directory being easier than that. I had the code at one point bu i deleted the cpp file that had it. I got it off of some coding site. i think it was Dani Web or something. I'll check there but im not sure.