Possible Duplicates:
C++: Easiest way to initialize an STL vector with hardcoded elements
Using STL Allocator with STL Vectors
out of curiosity i want to know quick ways of initializing vectors
i only know this
double inputar[]={1,0,0,0};
vector<double> input(inputar,inputar+4);
This is IMHO one of the failings of the current C++ standard. Vector makes a great replacement for C arrays, but initializing one is much more of a PITA.
The best I have heard of is the Boost assignment package. According to the docs, you can do this with it: