12-03-1.cpp

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

CPP
17
字号
#include <iostream>#include <iterator>#include <algorithm>#include <list>#include <functional>using namespace std;int main(){  const int N = 7;  double A[N] = {4, 5, 6, 7, 1, 2, 3};  list<double> L(N);    transform(A, A + N, L.begin(), identity<double>());  copy(L.begin(), L.end(), ostream_iterator<double>(cout, "\n"));}

⌨️ 快捷键说明

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