I'm creating a program that needs to store key-value pairs. The program needs to accept requests in the form of keys, and return the respective values.
The problem is that there are sometimes multiple values for each key, and the map class doesn't allow for duplicate keys.
The values are numbers, so I can't meaningfully concatenate the values like I would with strings.
Is there any elegant way of accounting for the fact that there can be more than one numerical value for each key? I want each number to be returned, not just one at random.