vendredi 27 juillet 2018

Template type in std::map

I want to create a vector of pairs. One of the pair members will be std::string and the second one templated type.

However this is giving me compilation error:

template <class T>
std::vector<std::pair<std::string, T> > arrayMembers;

Is this even possible? If som, how can I make it work?

Thanks and Regards

Aucun commentaire:

Enregistrer un commentaire