Sunday, November 6, 2011

standard template library in c++

standard template library

The heart of the C++ standard library, the part that influenced its overall architecture, is the standard template library (STL). The STL is a generic library that provides solutions to managing
collections of data with modern and efficient algorithms. It allows programmers to benefit from innovations in the area of data structures and algorithms without needing to learn how they work.

From the programmer's point of view, the STL provides a bunch of collection classes that meet different needs, together with several algorithms that operate on them. All components of the STL are templates, so they can be used for arbitrary element types. But the STL does even more: It provides a framework for supplying other collection classes or algorithms for which existing collection classes and algorithms work. All in all, the STL gives C++ a new level of abstraction. Forget programming dynamic arrays, linked lists, and binary trees; forget programming different search algorithms. To use the appropriate kind of collection, you simply define the appropriate container and call the member functions and algorithms to process the data.

The STL's flexibility, however, has a price, chief of which is that it is not self-explanatory. This post introduces the general concept of the STL and explains the programming techniques needed to use it. The first examples (link given below)show how to use the STL and what to consider while doing so. 

Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library by Scott Meyers 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
         Reference Books for C++ Standard Template Library

No comments:

Post a Comment