copy(istreambuf_iterator(cin), istreambuf_iterator(),
ostream_iterator(cout));
Another oft used idiom is initializing a container from an array:
#include
But if you want pure magic, look into Boost Lambda Library ;) A sample:
vector vp(10);
sort(vp.begin(), vp.end(), *_1 > *_2);