Answers for "convert vector to set c++"

C++
5

convert set to vector c++

#include <set>
#include <vector>

std::vector<int> some_vector(some_set.begin(), some_set.end());
Posted by: Guest on September-15-2020
6

convert vector to set c++

#include <set>
std::set<std::string> set_name(vector_name.begin(), vector_name.end());
Posted by: Guest on September-15-2020
0

convert vector to set c++

set <int> convertToSet(vector<int> v) 
{
	set<int> s(v.begin(),v.end());
	return s;
}
Posted by: Guest on March-27-2021
0

cpp convert vector to set

set<int> s( vec.begin(), vec.end() );
vec.assign( s.begin(), s.end() );
Posted by: Guest on September-09-2021

Browse Popular Code Answers by Language