Convert array to set in C++
arrays, c++, set
Solution
As for all standard library container types, use the constructor:
std::set<T> set(begin(array), end(array));
Problem
Is there an easier way to turn an array in to a set using c++ rather than looping through its elements? Preferably using the standard template library