C++ std::map s as arguments
Is it possible for me to take an argument of any type of std::map?
void myFunct开发者_JAVA技巧ion(const std::map<std::string,[INSERT_ANY_CLASS]>& tMap);
Yes, you can make it a function template:
template<class T>
void myFunction(const std::map<std::string,T>& tMap);
精彩评论