Re: How to add a string to a big file in csharp !
From: Zach (not_at_this.address)
Date: 11/04/04
- Next message: Tina: "Exam 70-315: Developing Web Applications with Visual C#.NET"
- Previous message: Chris Ballard: "RE: Create string of length X"
- In reply to: zjut: "How to add a string to a big file in csharp !"
- Next in thread: Zach: "Re: How to add a string to a big file in csharp !"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Nov 2004 10:25:36 +0100
"zjut" <zjut@discussions.microsoft.com> wrote in message
news:A24189A5-46B4-473D-ADBC-2CBBE97394E8@microsoft.com...
> I want to add a string to the file and the file is sort by letter! for
> examply:
> the follow file is a big file
> //////////////////////
> abort
> black
> cabbage
> dog
> egg
> fly
> .
> .
> ////////////////////
> and now i want to add "dad" into it !
Given:
* Your file ("old_file") is in alphabetical order
* old_file is immensely big
Required:
* Adding word ("new_word") to old_file at the right place.
Solution:
* Sequentially read old_file ("word_read") and write word_read to new_file
* If (new_word > word_read) and (new_word< word_read+1) then shove it in
- Next message: Tina: "Exam 70-315: Developing Web Applications with Visual C#.NET"
- Previous message: Chris Ballard: "RE: Create string of length X"
- In reply to: zjut: "How to add a string to a big file in csharp !"
- Next in thread: Zach: "Re: How to add a string to a big file in csharp !"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|