Input/Outpot

How can I print out, add or delete a specific data from a txt file?
e.g.
chicken: (chicken types, meals....etc)
meat: ......
fish: .....
turkey: .....

and i wanna print out all the chicken info that i have, is there a way to do that?
C++
Last edited on
The text file format doesn't really allow to "jump" into the text you are looking for. You would have to read sequentially until the desired data is read and then simply stop reading.

So basically read line by line, parse the line until you see your desired food keyword, then continue reading until end of file or the next food keyword.
ty
Topic archived. No new replies allowed.