21-1.cpp

来自「effective stl 源代码 code」· C++ 代码 · 共 25 行

CPP
25
字号
//
// Example from ESTL Item 21
//

#include <set>
#include <iostream>
#include "ESTLUtil.h"

int main()
{
	using namespace std;
	using namespace ESTLUtils;

	set<int, less_equal<int> > s;	// s is sorted by "<="

	s.insert(10);					// insert the value 10

	s.insert(10);

	show(s);						// I (LZ) am getting tired of typing 'printContainer("name",'...


	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?