Original Post
🔒 Locked
Learning STL
Advertisement
I've looked for those books and havn't found any good ones. All the online reviews on Amazon and Borders don't say many good things about STL books.
Recently I've been doing some work with STL and in hindsite, STL is too easy to even need a book. You just have to know and understand the "properties" of each container (which is mentioned in the STL docs in MSDN and the STL docs on http://www.dinkumware.com).
In my opinion, the easiest way to use STL containers is to inherit from them. For example
Note that STL map and STL set are both implemented as Red-Black trees, so they have the property of O(LogN) performance for insert() and find().
This means that when you insert an item or search for an item, and there are already a million items in the container, that (in the worst case) only 40 items will be visited for comparison.
Edited by - Marsupial Rodentia on January 4, 2001 1:18:47 AM
Recently I've been doing some work with STL and in hindsite, STL is too easy to even need a book. You just have to know and understand the "properties" of each container (which is mentioned in the STL docs in MSDN and the STL docs on http://www.dinkumware.com).
In my opinion, the easiest way to use STL containers is to inherit from them. For example
|
Note that STL map and STL set are both implemented as Red-Black trees, so they have the property of O(LogN) performance for insert() and find().
This means that when you insert an item or search for an item, and there are already a million items in the container, that (in the worst case) only 40 items will be visited for comparison.
Edited by - Marsupial Rodentia on January 4, 2001 1:18:47 AM
Marsupial Rodentia, thanks for the help. I am writing a text game for credit at my school. And am looking for what type of container I should use for the zones,items,intellegences etc. again thanks for the help.
"Nothing will ever be attempted if all possible objections must first be overcome."
- Samuel Johnson
"Nothing will ever be attempted if all possible objections must first be overcome."
- Samuel Johnson
"what type of container I should use for the zones,items,intellegences..." sounds like you need a remedial Algorithms and Data Structures class.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement