2-dim array or vectors solution

Gary Frick

Greenhorn

Posts: 28

posted 15 years ago

I need to store and run a tab on a list of items. The purpose is to do a running tally of a given item as the items present themselves. For example, If I were do a query selecting all fruit. I then need to tally up how many kinds of fruit were returned. So the 1st value is the type of fruit, and the second is a running count that gets incremented. Which mechanisam (arrays or vectors) are better suited for this? And how do I implement so that I have one entry of each type of fruit and then can update the second dimension that is the running count? Most appreciative, Gary