Ron Natalie <ro*@sensor.com> wrote in message
news:3f***********************@news.newshosting.co m...
"al" <al***@168.net> wrote in message
news:CE***********************@bgtnsc04-news.ops.worldnet.att.net... What are "class Pred" and "class A" for?
Map's are ordered containers. Pred is the "predicate" function for
providing that ordering. It's defaulted to "less" which just uses < (which works
for any type that defines that).
A is the allocator function which provides memory for the container's
dynamic parts. Again, this is defaulted and unless you spefically need to
control where things get allocated, you can just leave it defaulted.
Thanks a lot!
Is A really a function since is "class A"? Why is it needed to provide
memory for the container?
vector has a member function, reserve(). Is it always necessary to call it
when creating a vector container?