std::map< std::string ,std::string> mObj;
mObj["one"] = "hello";
mObj["two"] = "hello";
mObj["three"] ="hello;
输入为hello(这是dup)时如何获取键
Ex 1 : when refer to mObj["one"] = "hello";
input : hello
output: one
Ex 2: when refer to mObj["two"] = "hello";
input : hello
output: two
Ex 3 :when refer to mObj["three"] ="hello;
input : hello
output : three
在插入期间为所有重复值明确地指定唯一值是否很好。当收到输入你好,我得到相应的 唯一值(在内部完成)并获取正确的密钥。
请帮助解决此问题。