Dave's Brain

Browse - programming tips - standard template library

Title: C++: The Standard Template Library
Date: 1997dec23

If there's one single tip that I would give to a fellow C/C++ programer...
this is it: try out the	Standard Template Library!

Have you ever made a pointer mistake in a link list?  Who hasn't?
As you know, they'll cause memory leaks, crashes or both.  I use link
lists all the time and haven't had any problems like that for a couple
years.  Because, of course, I use the Standard Template Library (stl).

The stl is for managing containers of things.  e.g. link lists, arrays that
can dynamically grow, stacks, queues, associative arrays (maps).  You get the
idea.

MFC has some containing templates like CArray and CList.  CArray isn't too
bad but CList is nuts.  If you are using MFC you can still use the stl.  I do.

Primarily written by Alexander Stepanoy who has working at HP.  He has moved
on to SGI so the site's there.  To install with Borland C++ 4.52 unzip it in
a new directory called C:\BC45\INCLUDE\STL.  Then add this new directory
to the include path for any project that uses it.

http://www.sgi.com/Technology/STL/index.html

Add a comment

Sign in to add a comment
Copyright © 2008, dave - Code on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License.