Class Base {
public:
std::map<std::string, std::string> animals;
};
以下哪项是实例化 std::map<> 的正确方法?
Derived::Derived() {
animals["Rabbit"] = "Killer Rabbit";
//or
animals.insert( std::pair<std::string,std::string>("Rabbit","Killer Rabbit") );
}