Last active
October 11, 2016 11:17
-
-
Save sohale/3369a4c730c2938895a22db139d9214e to your computer and use it in GitHub Desktop.
Example usage of STL libraries, for quick review and reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void vector_capacity_reserve() { | |
// How to set the capacity of a vector? | |
// .reserve() | |
std::vector<int> new_faces; | |
new_faces.reserve(1000); | |
assert(new_faces.size() == 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment