Last active
August 29, 2015 14:27
-
-
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.
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
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