I am currently working on one of my first programmes.
It is to do with a Shop. I am having a hard time figuring out how to add the transactions of the customer (saves with I/Ostream) to display to the manager. I need the Litre Amount and Payment Total. I am looking to have 2 final sums of the Total Litre Amount and Total payment amount.
below is what is displayed in the text file.
I hope you're able to help.
The job is not soo easy. You would need to create a struct or class to hold the data, read the data from the file and store it in a vector. Then you can do all kinds of calculations.
Do you have experience with files and vectors?
First you need to learn to read the file line by line.
Once you have done this then you can focus on the second step - extracting the number from the line.