25-1.cpp
来自「effective stl 源代码 code」· C++ 代码 · 共 29 行
CPP
29 行
//
// Example from ESTL Item 25
//
#include <list>
#include <iostream>
#include <hash_set>
#include "ESTLUtil.h"
int main()
{
using namespace std;
using namespace ESTLUtils;
const int vals1[] = { 1, 25, 3, 47, -5};
const int nvals1 = sizeof vals1 / sizeof(int);
// hash_set<int> intTable; // create a hashed set of ints
hash_set<int> intTable(vals1, vals1 + nvals1);
printContainer("After init, intTable", intTable);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?