Hey I'm new with c++ and I'm trying to create a map wich can store multiples types :
map<sting, `auto`> test_map;
test_map["first elem"] = 1;
test_map["second elem"] = 'c';
Wich obviously gets me some errors.
I've been looking a bit online and I have found interesting things but not an answer. Maybe I miss a bit of c++ vocabulary.
I would also try with some kind of class wich stores about any types and I don't know if it can works.
map<string, `my_class`> test_map;
map["first_elem"] = my_class("string");
map["first_elem"] = my_class(12);
Thank you for helping !