Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ vector remove all duplicate elements

set<int> s( vec.begin(), vec.end() );
vec.assign( s.begin(), s.end() );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vector #remove #duplicate #elements
ADD COMMENT
Topic
Name
5+4 =