Question: Create a C++ program where you can edit text files. For example, data.txt has the following lines: Beast Boy, 075000, BBY, 0890 Phoenix, 000390,
Create a C++ program where you can edit text files. For example, data.txt has the following lines:
"
Beast Boy, 075000, BBY, 0890 Phoenix, 000390, PHX, 0090
"
here the 6 digit num is score and 4 digit num is rounds
And instruction.txt has the following:
"
"Beast Boy" 1 000980
"Phoenix" 2 0709
"
Here you will have to find out whether the name received from instruction.txt (here it is Beast boy and phoenix) exists in data.txt and if it does what is the integer that comes after the name. If it is 1 then update the 6 digit int from data.txt with the one in instruction.txt. If it is 2 replace round update the one data.txt with instruction.txt
Data manipulation has to be done inside the file so may need to use seekg, seekp, tellg, tellp.
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
