Skip to content

Instantly share code, notes, and snippets.

@Gibgezr
Created May 17, 2015 15:49
Show Gist options
  • Select an option

  • Save Gibgezr/259e7eee1ef31f3c53c7 to your computer and use it in GitHub Desktop.

Select an option

Save Gibgezr/259e7eee1ef31f3c53c7 to your computer and use it in GitHub Desktop.
C++ snippets
//lamda sort a vector
#include <algorithm>
std::sort(vect.begin(), vect.end(), [](ObjectType A, ObjectType B) -> bool{ return (A.id < B.id); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment