×

effective stl pdf

消耗积分:5 | 格式:rar | 大小:1485 | 2008-08-25

贾大林

分享资料个

Sure, the STL has iterators, algorithms, and function objects, but for most C++
programmers, it's the containers that stand out. More powerful and flexible than arrays,
they grow (and often shrink) dynamically, manage their own memory, keep track of
how many objects they hold, bound the algorithmic complexity of the operations they
support, and much, much more. Their popularity is easy to understand. They're simply
better than their competition, regardless of whether that competition comes from
containers in other libraries or is a container type you'd write yourself. STL containers
aren't just good. They're really good.
This chapter is devoted to guidelines applicable to all the STL containers. Later
chapters focus on specific container types. The topics addressed here include selecting
the appropriate container given the constraints you face: avoiding the delusion that
code written for one container type is likely to work with other container types: the
significance of copying operations for objects in containers: difficulties that arise when
pointers of auto_ptrs are stored in containers: the ins and outs of erasing: what you can
and cannot accomplish with custom allocators: tips on how to maximize efficiency:
and considerations for using containers in a threaded environment.
That's a lot of ground to cover, but don't worry. The Items break it down into bitesized
chunks, and along the way, you're almost sure to pick up several ideas you can
apply to your code now.

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !