c++(数据类型 && set插入重复数据)

	set<int> s1;
	auto ret = s1.insert(10);
	if (ret.second) 
		cout << "插入成功" << endl;
	else
		cout << "插入失败" << endl;
	auto ret2 = s1.insert(10);
	if (ret2.second)
		cout << "插入成功" << endl;
	else
		cout << "插入失败" << endl;

posted on 2021-04-28 15:08  lodger47  阅读(1878)  评论(0)    收藏  举报

导航