11-06-03.cpp

来自「more efftive 代码」· C++ 代码 · 共 15 行

CPP
15
字号
#include <iostream>#include <cstdlib>#include <list>#include <algorithm>using namespace std;int main(){  list<int> L;  generate_n(front_inserter(L), 1000, rand);    list<int>::const_iterator it = min_element(L.begin(), L.end());  cout << "The smallest element is " << *it << endl;}

⌨️ 快捷键说明

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