-
April 30th, 2009, 11:31 AM
#1
Container classes
Hello,
I am new to Container classes in C++ and would like to know how to use them along with their advantages and disadvantages. Does anyone know of a book that would go over the basics with a few examples of each?
Thank you.
Nick.
-
April 30th, 2009, 11:52 AM
#2
Re: Container classes
There's a pretty good reference here:
http://www.cplusplus.com/reference/stl/
As for the advantages/disadvantages, they carry over fairly directly from the nature of the underlying data structure used by each container, eg vector uses an array, list used a doubly linked list, set uses a red/black tree, etc.
-
April 30th, 2009, 08:07 PM
#3
Re: Container classes
Thanks Lindley,
I wanted to the runtime of the program in terms of big O. Using container classes, kind of hinders the understanding, because everything happens in the background. And so, I wanted to understand how they perform the inbuilt functions and their runtimes. If you can give any idea, it'll be great.
Thanks.
Nick
-
April 30th, 2009, 08:37 PM
#4
Re: Container classes
The above page includes a "Complexity" bit for each member function. There are a few side-by-side comparison tables floating around Google.
-
April 30th, 2009, 10:37 PM
#5
Re: Container classes
Well Lindley, you are a better man then I am.
-
May 1st, 2009, 01:12 AM
#6
Re: Container classes
Effective STL by Scott Meyers and STL for C++ Programmers.
http://www.amazon.com/STL-C-Programm.../dp/0471971812
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|