Home arrow C++ arrow The Standard Template Library
C++

The Standard Template Library


STL stands for Standard Template Library. It has been one of the most important parts of the standard library since 1999. bringing the most crucial improvements to the C++ language. It redefined the way we perceive data structures and the way we are coding right now. If you've just learned the basics of C++, then this is definitely an article that will help you gather more knowledge and progress.

Author Info:
By: Gabor Bernat
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
June 24, 2008
TABLE OF CONTENTS:
  1. · The Standard Template Library
  2. · History Class
  3. · Looking Inside the Library
  4. · Iterators

print this article
SEARCH DEVARTICLES

The Standard Template Library
(Page 1 of 4 )

Please accept my congratulations for taking the effort to improve yourself in this area of programming and for picking my article to do this. As you can probably tell from the introduction, you should have a good grasp of C++ at the very least, before you begin reading further.

However, if OOP (Object Oriented Programming) isnít a problem for you, but you lack some good template usage/creation knowledge, donít hesitate to read the article I also wrote on templates. A quick search on this site should reveal the location of that specific article. In order to follow along with me, itís required that you empower yourself with the information contained in that article. If you are interested in any of the aforementioned topics, then enjoy the information that I try to share with you.

In the next few pages weíll look at the standard library, learn its basics, and try to comprehend the idea behind it. In this first part I try to show you the basics and how a library like this is constructed. We wonít cover every corner of STL, because that would require an entire book, and besides, a very good collection of help files are already present. A help file that was created by the people that created the library itself is just a click away at the following link: the SGI site.

The first part of this article series is dedicated to some interesting history about STL and to presenting some code from the implementation file and observing how it works. The second part will go over the existing data structure in STL, along with the strengths and weaknesses of each container and its construction.

The final part is reserved for a complex STL code sample. I hope I am going to have awakened enough interest that you will follow through and research/try out some code with STL. If you think you are starting to get it, then take a look at the code snippet that implements Edgar Dijkstra's Shunting algorithm for resolving complex arithmetic expressions.

Iíll show you how to implement it using the power of STL and by being aware of the penalties a container brings in order to avoid (or minimize) a lapse in performance. Weíll also create a program that can be used effectively to calculate arithmetic expressions, or to write your own compiler just as in Visual Studio. Itís quite surprising what we can do with just a few lines of code.

But enough talk about what will be in the future. Letís start now!


blog comments powered by Disqus
C++ ARTICLES

- Intel Threading Building Blocks
- Threading Building Blocks with C++
- Video Memory Programming in Text Mode
- More Tricks to Gain Speed in Programming Con...
- Easy and Efficient Programming for Contests
- Preparing For Programming Contests
- Programming Contests: Why Bother?
- Polymorphism in C++
- Overview of Virtual Functions
- Inheritance in C++
- Extending the Basic Streams in C++
- Using Stringstreams in C++
- Custom Stream Manipulation in C++
- General Stream Manipulation in C++
- Serialize Your Class into Streams in C++

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials