I want to have a map datastructure where the second element is always an int but the first can be an int, or a string. Is this possible in C++.
So, something like
Is that a possibility? I want to build up a map (or something similar) where each element is the key to some number. The elements will be of two types, either strings or numbers. I won't know beforehand what the percentage of each will be.Code:std::map <int | std::string, int> my_map
Any help wud be well appreciated.