S
Sooraj S
Hi,
I am new to cpp.
Is it possible to edit the content of a file without creating a temp
file.
ie I dont want to use this way.
1.using ifstream open the file in read mode
2.open a temp file using ofstream in write mode
3.read from the original file line by line and write to temp file.
4.write to temp file.
Can any one suggest any other way. Pls giev me a sample program to
File
-----
john 12345
kiran 4123
Alex 12344
I want to change kiran's number to 3333
I am new to cpp.
Is it possible to edit the content of a file without creating a temp
file.
ie I dont want to use this way.
1.using ifstream open the file in read mode
2.open a temp file using ofstream in write mode
3.read from the original file line by line and write to temp file.
4.write to temp file.
Can any one suggest any other way. Pls giev me a sample program to
File
-----
john 12345
kiran 4123
Alex 12344
I want to change kiran's number to 3333