copy a set into vector code example Example: copying a set to vector in c++ std::set<T> s; //... std::vector v( s.begin(), s.end() );