FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Count word frequencies
Accumulate word counts in an ordered C++ map.
C++✓ Tested
Look up a map key
Use find to read a C++ map without inserting a missing key.
C++✓ Tested
Remove odd values
Use the erase-remove idiom to filter a C++ vector in place.
C++✓ Tested
Sort a vector
Sort C++ integer values in ascending order.
C++✓ Tested
Sort and deduplicate values
Sort a C++ vector and erase adjacent duplicates.
C++✓ Tested