Hi
outfile.open ("test.txt",ios::in | ios::out |ios::ate );
works. It does not overwrite the existing contents plus it replaces the text from "an apple" to "a sample"
Thansk a lot.
Type: Posts; User: simran
Hi
outfile.open ("test.txt",ios::in | ios::out |ios::ate );
works. It does not overwrite the existing contents plus it replaces the text from "an apple" to "a sample"
Thansk a lot.
Hi
I tried it again. This is not working for me. I checked the text.txt file. It contains "This is an apple" only.
What could be the problem?
Thanks.
Thank you for replying.
I tried this way too. if i open the file like
outfile.open ("test.txt",ios::out|ios::ate);
or
outfile.open ("test.txt",ios::ate);
it overwrites the contents of...
Hi
I am witing a program to change the the text in a file from "This is an apple" to This is a sample". I need to open the file in append mode too for adding text afterward.
The code for program...