Skip to content

Instantly share code, notes, and snippets.

@domtronn
Last active August 29, 2015 14:27
Show Gist options
  • Save domtronn/dc75fd3ecb8b8cfb064e to your computer and use it in GitHub Desktop.
Save domtronn/dc75fd3ecb8b8cfb064e to your computer and use it in GitHub Desktop.
A quick remainder on the easiest way to initialise a vector of integers pre C++11.
int ints[] = {1,2,3,4,5};
vector<int> vec (ints, ints + sizeof(ints) / sizeof(ints[0]) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment