My question is for the C++ purists here. I know that Bjarne Stroustrop wants us to get in the habit of using C++ vectors: http://www.youtube.com/watch?v=YQs6IC-vgmo
For C-style arrays you do:
int arr[] = {69, 2, 3};
What is the equivalent way to initialize a C++ vector? That is, when you're programming in C++ and need a dynamic, random-access container and you already know some of the elements that need to be in it, what is the best way to initialize that sucker?
Obviously you can do
int myints[] = {16,2,77,29};
std::vector<int> fifth (myints, myints + sizeof(myints) / sizeof(int) )
but that's not very elegant ....