|
Replacing line with a new file in a file
Hi,
I have a txt file which contains:
Apple is red.
Orange is orange.
Banana is yellow.
Strawberry is red.
-eof-
How do I go about replacing "Banana is yellow" with "Cherry is red"? I tried to use seekp to get the position of Banana and replace that line but unable to.
Please advise. Thanks.
|