blob: 12ca7e95b09f3de7b4305784bf6acb1c1e1a642e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <iostream>
#include <vector>
#include <list>
/*
*
* 9.13
*
*
*/
int main () {
std::vector<int> vi(25, 50);
std::list<int> li(25, 99);
std::vector<double> vb1(vi.cbegin(), vi.cend());
std::vector<double> vb2(li.cbegin(), li.cend());
for(auto &a : vb1) {
std::cout << a << " ";
}
std::cout << std::endl;
for(auto &a : vb2) {
std::cout << a << " ";
}
std::cout << std::endl;
return 0;
}
|