![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Adding more info to a text file without erasing
Ok I would like to add more info to a text file without erasing what is already written to that file.
What i mean is i have a program that reads the text from a text box and saves it to the txt file. I would like that same program to add a new line of text to that txt file without erasing the original text. I hope that makes sense, and yes i do know how to use a stream writer and reader.
__________________
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
Open the file in Append Mode.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Also, if your really messing with the file, it's sometimes easier to read all of the data, and then write it all in again. Just depends on what your task is, and how efficient you can make it.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting string to float | beginnerCCC | C | 22 | Oct 2nd, 2006 11:59 PM |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 8:55 AM |
| How to detect cursor location and insert text??? | syntax-error | C# | 3 | Jun 30th, 2005 1:42 AM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 9:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |