Skip to content

Instantly share code, notes, and snippets.

@MarkSilverMedia
Created April 12, 2017 17:49
Show Gist options
  • Save MarkSilverMedia/c78f551fe6d3aaf5aa10cd819dd6fc0f to your computer and use it in GitHub Desktop.
Save MarkSilverMedia/c78f551fe6d3aaf5aa10cd819dd6fc0f to your computer and use it in GitHub Desktop.
Blip for a school C++ project (resizing vectors)
/*
This is a portion of a program that I'm writing here because I am away from my personal computer at the moment.
This code will not work without the context-specific remainder of the program, but feel free to fork this for whatever purpose.
*/
while (NumArray.size<ArrayLength) {
NumArray.push_back(0);
}
while (NumArray.size>ArrayLength) {
NumArray.pop_back();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment