Funflow, techflow.
template <typename T, size_t size> void FillSet(std::set<T>& target, const T (&list)[size]) { for(size_t i=0; i<size; ++i) target.insert(list[i]); }
int startkit[] = {10,2,8,4,3,1}; std::set<int> numbers; FillSet(numbers,startkit);
No comments:
Post a Comment