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.
Printable View
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.
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.
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
The above page includes a "Complexity" bit for each member function. There are a few side-by-side comparison tables floating around Google.
Well Lindley, you are a better man then I am.
Effective STL by Scott Meyers and STL for C++ Programmers.
http://www.amazon.com/STL-C-Programm.../dp/0471971812