When we use a complicated container in C++, like
std::vector<std::map<std::string, std::set<std::string>>> table;
the only way to add an empty map (which may represent a row or column) is to initialize a new element and push it back
table.push_back(std::map<std::string, std::set<std::string>>());
Is there any way to avoid redeclaring the type, and just adding the correct typed element?
Aucun commentaire:
Enregistrer un commentaire