Intellectual question files and streams in c ++

Suppose I have a file called a.txt with the following products in it with the price
Onion 50
Tomato 100
Potato 500
So I create a new file and put the prices from 100 to 300 dollars inside the new file, assuming its name is a file named b.txt
After creating a file it will be entered
Tomato 100
Potato 500
I ask you how to write the condition in the topic of files and streams in c ++

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

I came up with the idea and this idea is part of the entire code

What have you tried to do so far? What code have you written? This is pretty close to some homework you asked about before, so code you have already written should be close to what you need.