Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

erase duplicates and sort a vector

sort( vec.begin(), vec.end() );
vec.erase( unique( vec.begin(), vec.end() ), vec.end() );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #erase #duplicates #sort #vector
ADD COMMENT
Topic
Name
9+6 =