1#include <set>
2#include <vector>
3
4std::vector<int> some_vector(some_set.begin(), some_set.end());
1#include <iostream>
2#include <vector>
3
4using namespace std;
5
6int main()
7{
8 int arr[] = {1, 2, 3, 4, 7};
9 vector<int> v1;
10 vector<int> v2;
11 v1.assign(arr, arr+5);
12 v2.assign(arr, arr+2);
13
14 //printing values of v1
15 cout << "elements of v1" << endl;
16 for(int i = 0; i < v1.size(); i++)
17 {
18 cout << v1[i] << endl;
19 }
20
21 //printing values of v2
22 cout << "elements of v2" << endl;
23 for(int i = 0; i < v2.size(); i++)
24 {
25 cout << v2[i] << endl;
26 }
27 return 0;
28}
29