Examples for stdlib hashmap

I am trying to use the hashmap from stdlib but there are no real or clear simple examples of how to add a key-value pair or retrieve a key-value pair and other small, simple examples. Alternatively, perhaps, it is just not clear to me.

Could I have some usage examples. Thanks.

I made limited use of the stdlib hashmap in this advent of code program. I was just using it to record keys – not associate data with them. The latter involves the routine get_other_data and some related wrapper classes.

If you have a look at the the specs, there is an example program under get_other_data which shows how to add and retrieve some data.

1 Like

Thanks @gareth. This is very useful.