Now I need to use that data based on what a user enters.
Entry: ABC CBB AAB CCA BBA ABB AC
So, assuming I'm using three arrays to hold the data, then I would need to search through the array to find 'A', use the data, then for 'B', then for 'C', etc.
My first thought would be an array of size 67 ('C' = 67) so that I could reference like array['C'] to get the data needed. However, this leaves a lot of dead space between 32 and 65 (Space and 'A' ASCII), and there was no third array holding the characters.
So, as a recap, I need to be able to use data based on each character in a string, and that character could (Potentially) Be anything from ASCII 32 - 90, and maybe even higher.
What is the best way to store this data, given that I don't know what characters might be used, and that theoretically, I could need all the way up to ASCII 255?
It will always return you a value, even if there is no pre-existing entry for the key. It will obligingly create a new map entry (with the default value for the type) and return to you. If that's the behaviour you need, fine. But if you need to check if an entry for a given key exists, then you must use map::find.
Similarly, map::insert should be used if you need to be able to detect collisions with existing entries.