33 lines
706 B
C++
33 lines
706 B
C++
|
/* STL */
|
||
|
#include <algorithm>
|
||
|
#include <deque>
|
||
|
#include <functional>
|
||
|
#include <iterator>
|
||
|
#include <list>
|
||
|
#include <map>
|
||
|
#include <memory>
|
||
|
#include <numeric>
|
||
|
#include <queue>
|
||
|
#include <set>
|
||
|
#include <stack>
|
||
|
#include <utility>
|
||
|
#include <vector>
|
||
|
/* STD */
|
||
|
#include <iostream>
|
||
|
#include <string>
|
||
|
#include <cstdlib>
|
||
|
#include <math.h>
|
||
|
using namespace std;
|
||
|
|
||
|
int main (int argc, char *argv[]) {
|
||
|
int a[4] = {10, 20, 30, 40};
|
||
|
vector<int> v(a, a+4);
|
||
|
list<int> L(4); // Список из 4 элементов
|
||
|
copy(v.begin(), v.end(), inserter(L, ++(++(L.begin()))));//L.begin());
|
||
|
list<int>::iterator i;
|
||
|
for (i=L.begin(); i != L.end(); ++i)
|
||
|
cout << *i << " ";
|
||
|
cout << endl;
|
||
|
return 0;
|
||
|
}
|