C++: Smarter Sorting Functions

Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=5sAt1NLNYOs



Duration: 3:27
323 views
7


One small tip that is still very useful - if you want to sort a vector on one property, but on a tie sort on another, but on a tie sort on another, etc., there is this thing called std::tie that will allow you to write that whole thing in a one-liner. Fast and easy.