summer_2 0 Newbie Poster

I want to create an edit function, the flow is
In a loop, read the next record until there are no more records.
If we found the record we want:
Write the new data to the output file
else
Write the old data to the output file
end loop
Close the input and output files, erase the input file and rename the output file.

I have try while(getline(file,line)) and while(!file.eof()) but both of it not able to read the content i wrote in the txt :
I want when the user key in want to edit property type, if found "propert type" word, then rewrite the file but i have tried many time still not able to read the word

Property type : Single-storey House
Landlord name : Jason Chee
Property address: No 2, Jalan SB Besar 1/1,

i would like to ask is they any method to solve it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.