It looks simple, but I'm confused: the way to create a vector from hundreds, say int ,
std::vector<int> *pVect = new std::vector<int>(100);
However, looking at the std :: vector documentation , I see that its constructor has the form
explicit vector ( size_type n, const T& value= T(), const Allocator& = Allocator() );
So how does the previous one work? Does new constructor with the initialization value obtained from the default constructor? If so, then
std::vector<int, my_allocator> *pVect = new std::vector<int>(100, my_allocator);
where do I transfer my own dispenser, also work?
c ++ stl stdvector
recipriversexclusion
source share