map、set插入元素

xiaoxiao2021-02-28  50

map中插入元素:

1、map[key]=value;

2、map.insert(make_pair(key,value));

3、pair1 = m.insert(pair<int,string>(key,value)); 

set中插入元素:

s.insert(value);

转载请注明原文地址: https://www.6miu.com/read-2621909.html

最新回复(0)