Contact: aviboots(AT)netvision.net.il
41,445 questions
53,992 answers
573 users
#include <iostream> #include <set> using namespace std; void printSet(set<int> st) { for (auto n: st) { cout << n << ' ' ; } } int main () { int arr[] = {1, 2, 3, 4, 5}; std::set<int> st(arr, arr + 5); printSet(st); return 0; } /* run: 1 2 3 4 5 */