The vector with pointers of std::vector<VirtualFoo*> cfoos;
is fine. You cannot instantiate abstract classes, hence the compiler fails to instantiate or specialize vector template that use abstract class as value. Pointing elements with base class pointers is fine which is Liskov substitution principle(http://en.wikipedia.org/wiki/Liskov_substitution_principle)
I agree with the comments from others that shared pointers is better solution so that you don't have to worry about memory management:
std::vector<shared_ptr<VirtualFoo>> cfoos;
cfoos.push_back( shared_ptr<VirtualFoo> (new ConcreteFoo(1.0)) );
cfoos.push_back( shared_ptr<VirtualFoo> (new ConcreteFoo(2.0)) );