Implementing Abstract Factory as an STL Container
By Jason Shankel, December 01, 1997
The Abstract Factory design pattern provides an abstract interface for object creation. This allows applications to select object implementation at run time. Jason implements the Abstract Factory pattern using C++ and the Standard Template Library.
Dr. Dobb's Journal December 1997: The STL Set Class
The STL Set Class
By Jason Shankel
Dr. Dobb's Journal December 1997
set<int,less<int> > ::iterator
find_it;
//Object in set
find_it=myIntSet.find(5);
//(*find_it)==5
//Object not in set
find_it=myIntSet.find(20);
//find_it==myIntSet.end()
Example 2: If a set does not contain the object, find returns the end iterator.
Back to Sidebar
Copyright © 1997, Dr. Dobb's Journal