I probably didn't word the question very well, but here's an example of what I mean. An unordered_map
can be created like so:
unordered_map<string,int> map = {
{"A", 3},
{"B", 2},
{"C", 1}
};
What I'm wondering is how can I make my own class that can function this way? Like, how are all of the values passed to the map interpreted? How can I access each individual value in the array I'm assigning to it? In fact, would it even be an array, because the values don't all necessarily share a type?