I've searched this forum and other forums and I can't find anything that tells you how to delete text from a text file (while using a program). Anyone know how to?
It depends. If you open the file using the ios::trunc mode then it deletes all text during the open. If you need to delete some text from the file then you have to read the data into the program, make the modification and rewrite it to the file. There are so many ways of doing this that it is impossible to answer the question unless you show us some code that you are working on or give us more detailed requirements for your program.
Well, as of now, I have almost nothing to my program except for like, "Welcome". That kind of crap. I can tell you what I want it to do though.
I'm making a program that will take user input add the numbers that the user inputted together and then write it to a text file in many different ways (each number that was added, the total, the semitotals, etc.).
If the user closes the program and then reopens it, I need the program to read the text file and draw the old numbers out and use them in the calculations with the new numbers and get new totals. When it gets new totals I need it to erase certain parts of the text-file and then write the new numbers in its place.