Advertisement

STL

Started by September 28, 2000 04:59 PM
4 comments, last by DW-za 24 years, 3 months ago
OK, I have to confess it, I hardly know anything when it comes to STL... So I''ve got some simple questions... - in short, what is it to you (the book I learnt C++ from had a paragraph with some 5 lines saying it ways some kind of storage means)? - where can I find it (or typically what headers would I have to include, or something like that, I trully don''t know...)? - how can I use it? how can I customize it? - are there any useful links on the net (ie. I found a site which had some complete reference of STL and etc etc etc, so we went there AND I found the most mucked up excuse for a university to say it had a complete reference for STL, totally unnegociable)? Being punctual is only making your mistake on time... Murphy
Being punctual is only making your mistake on time...Murphy1 to 3 chefs make a good restaurant 100 chefs makes a McDonaldsTim Sweeney
- The STL, standing for "Standard Template Library" essentially comprises the C++ libraries, and is defined in the ANSI C++ standard. All compilers should ship with an STL implementation. Among the STL are a bunch of standard container types, like list, queue, map, etc.

- See above. If you want a separate implementation, try stlport.com or dinkumware.com. There are a number of other implementations that are quite good as well but I can''t remember the websites offhand.

- Erm... well, the STL has a plethora of uses

- I''ve never found a really good STL doc online. The websites I listed above have online documentation that details what is in the libraries but there aren''t any "how to''s." There are a few books on the STL that you can get, though. I''d reccommend grabbing a book on data structures as well if you aren''t familiar with them.
Advertisement
The STL section over at SGI is a good place to start, but it''s mostly a reference. You''ll probably want to have a look at these places:

STL Newbie guide

The Standard Template Library Tutorial

An Overview of The Standard Template Library

Standard Template Library Online Reference
A very good book about STL is "The C++ Standard Library: A tutorial and reference" by Nicolai M. Josuttis. I just picked it up a few weeks ago and it has helped alot. Good tutorials and functions as a great reference too.
I like to think of stl as a bunch of arrays and linked lists joined with some standard ways of interacting with them(searching, sorting, inserting, etc)

Personally, learn STL, it''ll be scary at first if your not used to templates as the errors look hard to read. I read a good book called "STL from the ground up", it really helped.

I really wouldn''t consider not using STL now that I''ve started using it. During the optimisation phase I might consider replacing the code with something hard crafted but... unlikly.

Once you get good with templates you might even find yourself writing your own STL... (I start doing a home grown vector and list before I realised what I was doing)

gimp
Chris Brodie
Wilka - I didn''t ask the original question, but thank you. I have been struggling to find online info on STL for a few days now.

"It's obvious isn't it Miller? Curiosity killed these cats!"
"It's obvious isn't it Miller? Curiosity killed these cats!"

This topic is closed to new replies.

Advertisement