Skip to content

Instantly share code, notes, and snippets.

@iwagaki
Created February 18, 2015 17:35
Show Gist options
  • Save iwagaki/f16af9f1c7be1e044133 to your computer and use it in GitHub Desktop.
Save iwagaki/f16af9f1c7be1e044133 to your computer and use it in GitHub Desktop.
How to initialize a vector
int a[] = {1, 2, 3, 4, 5};
vector<int> example(a, a + sizeof(a) / sizeof(a[0]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment