地图变成多重映射 [英] maps turn into multimaps
问题描述
如果多次插入相同的密钥,地图会转换为多地图吗?
Do maps convert to multimaps if the same key is inserted more than once?
推荐答案
On 2008-08-26 21:44,brad写道:
On 2008-08-26 21:44, brad wrote:
如果多次插入相同的密钥,地图是否会转换为多地图?
Do maps convert to multimaps if the same key is inserted more than once?
当然不是,如果他们这样做,他们将是多图而不是地图。
-
Erik Wikstr ?? m
Of course not, if they did they would be multimaps and not maps.
--
Erik Wikstr??m
Erik Wikstr ?? m写道:
Erik Wikstr??m wrote:
2008-08 -26 21:44,brad写道:
On 2008-08-26 21:44, brad wrote:
>如果多次插入相同的密钥,地图会转换为多地图吗?
>Do maps convert to multimaps if the same key is inserted more than once?
当然不是,如果他们这样做,他们将是多地图而不是地图。
Of course not, if they did they would be multimaps and not maps.
我有一个地图的行为就像它是一个多图。两个键是
相同。编译并按预期运行。
I have a map that behaves as if it were a multimap. Two keys are the
same. Compiles and runs as expected.
brad写道:
brad wrote:
Erik Wikstr ?? m写道:
Erik Wikstr??m wrote:
>在2008-08-26 21:44,brad写道:
>On 2008-08-26 21:44, brad wrote:
>>做地图如果多次插入相同的密钥,请转换为多地图?
>>Do maps convert to multimaps if the same key is inserted more than once?
当然不是,如果他们这样做,他们将是多地图而不是地图。
Of course not, if they did they would be multimaps and not maps.
我有一张行为与地图相同的地图如果是多图。两个键是
相同。按预期编译和运行。
I have a map that behaves as if it were a multimap. Two keys are the
same. Compiles and runs as expected.
等等......也许我误解了地图。它是独一无二的k,v对还是只有
唯一键?如果它是前者,那么这将是有道理的。我的印象是后者。
Wait... perhaps I misundersatnd maps. Is it unique k,v pairs or just
unique keys? If it''s the former, then that would make sense. I was under
the impression it was the latter.
这篇关于地图变成多重映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!