首页 > TAG信息列表 > furong

unordered_map

无序map容器 对于有顺序要求的问题,map会更高效一些 对于查找问题,unordered_map会更加高效一些 #include <iostream> #include <unordered_map> int main() { std::unordered_map<int, std::string> umap; umap.emplace(1, "furong"); umap.emplace(5, "quange&qu

类模板与函数模板区别1

#include <iostream> template<class typeName, class typeAge> class Person { public: Person(typeName name, typeAge age): name(name), age(age) {} void show() { std::cout << "name " << name <<

类模板与函数模板区别2

#include <iostream> template<class typeName, class typeAge = int> class Person { public: Person(typeName name, typeAge age): name(name), age(age) {} void show() { std::cout << "name " << name <