Check out example codes for "convert set to vector c++". It will help you in understanding the concepts better.

Code Example 1

#include <set>
#include <vector>

std::vector<int> some_vector(some_set.begin(), some_set.end());

Learn ReactJs, React Native from akashmittal.com