How do I read SPECIFIC data from textfile

chisel 50 1.99 hammer 20 2.99 <---- actual textfile

I want to read the data for hammer but I don't know how
Last edited on
Read and ignore the first set of data?
cout << chisel << " " << numberOfUnits << " " << price << " " << (numberOfUnits * price);

I have to do that for a number of variables but I don't know how to read the data for the hammer without reading the data for the chisel.

You have to read the data for the chisel first to know where it ends. That doesn't mean you have to actually do something with it once you read it.
Topic archived. No new replies allowed.