File I/O inside a text file
-
Sorry for the newbie question, but lets say i have a text file, and in a certain location in the text file, there is a string of characters I would like to modify.. lets say its HIGHSPEED.. if I want to replace HIGHSPEED with DIALUP, without having excess whitespaces, how would I accomplish that? I want to remove the extra spaces that would be at the end if I were to seek the offset, and replace the word with my secondary word. Thanks in advance. btw. I can do this in MFC or C style. MFC prefered (bleh)
-
Sorry for the newbie question, but lets say i have a text file, and in a certain location in the text file, there is a string of characters I would like to modify.. lets say its HIGHSPEED.. if I want to replace HIGHSPEED with DIALUP, without having excess whitespaces, how would I accomplish that? I want to remove the extra spaces that would be at the end if I were to seek the offset, and replace the word with my secondary word. Thanks in advance. btw. I can do this in MFC or C style. MFC prefered (bleh)
Is the file very large? If not, you could load it into memory, perform string replace and write back. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
-
Sorry for the newbie question, but lets say i have a text file, and in a certain location in the text file, there is a string of characters I would like to modify.. lets say its HIGHSPEED.. if I want to replace HIGHSPEED with DIALUP, without having excess whitespaces, how would I accomplish that? I want to remove the extra spaces that would be at the end if I were to seek the offset, and replace the word with my secondary word. Thanks in advance. btw. I can do this in MFC or C style. MFC prefered (bleh)
replace HIGHSPEED with DIALUP You must handle that. Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Is the file very large? If not, you could load it into memory, perform string replace and write back. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
Even if it's so large, you can use String tech with FileMapping :rolleyes: Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
-
Even if it's so large, you can use String tech with FileMapping :rolleyes: Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com
How do you grow or shrink memory mapped file? Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?