Template Classes for Arrays, Lists, and Maps


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Template Classes for Arrays, Lists, and Maps.

These collection classes are templates whose parameters determine the types of the objects stored in the aggregates. The CArray, CMap, and CList classes use global helper functions that must usually be customized. For more information about these helper functions, see Collection Class Helpers. The typed pointer classes are wrappers for other classes in the class library. By using these wrappers, you enlist the compiler's type-checking to help you avoid errors. For more information on using these classes, see Collections.

These classes provide templates you can use to create arrays, lists, and maps using any type you like.

Template class for making arrays of arbitrary types.

Template class for making lists of arbitrary types.

Template class for making maps with arbitrary key and value types.

Template class for type-safe arrays of pointers.

Template class for type-safe lists of pointers.

Template class for type-safe maps with pointers.

Class Overview