I want to creat a class or something in order to store different kinds of information, like string, map, bool, int, etc.
I want to do is like:
dictionary func(dictionary & dict){}.
And the content in the dictionary is not fixed, maybe I use func1(), and func2(), but they require different arguments.
For now, I created a class to store arguments, it has different kinds of members, is it a good way? Or I need to find a good solution? Thanks
You would be best served by leveraging the existing
std::undordered_maphashtable/map implementation perhaps in combination withboost.anyif you want to mix key or value types.