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> > myIntSet;
for (int val=0;val<10;val++)
myIntSet.insert(val);
for (set<int,less<int> >::iterator
it = myIntSet.begin();
it!=myIntSet.end();
it++)
cout << *it;
Example 1: Declaring a set of integers.
Back to Sidebar
Copyright © 1997, Dr. Dobb's Journal