<$BlogRSDUrl$>

Saturday, January 03, 2004

STL Containers
Following are the general requirements for containers :-
  1. Containers copy elements internally when they are inserted rather than managing references to it. Thus, each element of an STL container must be able to be copied. If objects you want to store don't have a public copy constructor, or copying is not useful (for example, because it takes time or elements must be part of multiple containers), the container elements must be pointers or pointer objects that refer to these objects
  2. Each container type provides operations that return iterators to iterate over the elements
  3. In general, operations are not safe. The caller must ensure that the parameters of the operations meet the requirements.


This page is powered by Blogger. Isn't yours?