WINPRO MFC Collection Class
WINPRO MFC Collection Class
Amarsanaa .G
School of Information Technology
National University of Mongolia
MFC Collection class
A collection class is used to create objects
that are capable of storing other objects.
Using a collection allows the programmer to
hold, process, or store groups of class objects
or variables of certain standard types.
Three basic types of collection class:
CArray, CList, CMap
Each is available in template and non-
template version.
#include <afxtempl.h>
CArray class
A safe array and enables you to store and access
data using subscript, or [ ] operator.
CArray consumes memory and time when growing or
attempting to store in the middle.
If time is a factor then use a simple array instead
which does not grow dynamically.