Partilhar via


CAtlArray Class

This class implements an array object.

template< 
   typename E,
   class ETraits = CElementTraits< E > 
>
class CAtlArray

Parameters

  • E
    The type of data to be stored in the array.

  • ETraits
    The code used to copy or move elements.

Remarks

CAtlArray provides methods for creating and managing an array of elements of a user-defined type. Although similar to standard C arrays, the CAtlArray object can dynamically shrink and grow as necessary. The array index always starts at position 0, and the upper bound can be fixed, or allowed to expand as new elements are added.

For arrays with a small number of elements, the ATL class CSimpleArray can be used.

CAtlArray is closely related to MFC's CArray class and will work in an MFC project, albeit without serialization support.

For more information, see ATL Collection Classes.

Requirements

Header: atlcoll.h

See Also

Reference

CArray Class

Other Resources

MMXSwarm Sample

DynamicConsumer Sample

UpdatePV Sample

Marquee Sample

CAtlArray Members

ATL Class Overview