Currently I read a text file line by line and find all matching data and display them.
So if my text file data is a below
Bag|30|23Mar2015
Bag|30|23Mar2015
Bag|30|24Mar2015
Bag|30|25Mar2015
Bag|30|23Mar2015
And I wish to display the output as
23Mar2015 90
24Mar2015 30
25Mar2015 30
But currently what I able to do is
23Mar2015 30
23Mar2015 30
24Mar2015 30
25Mar2015 30
23Mar2015 30
How do I add those that have unique date value together and display as one? Can anyone enlighten me?
Hi Peter87, i am quite new to C++, and not sure how does map works, is there any other ways to do the required stuff i need?