class CStringArray : public CObject

The CStringArray class supports arrays of CString objects.

The member functions of CStringArray are similar to the member functions of class CObArray. Because of this similarity, you can use the CObArray reference documentation for member function specifics. Wherever you see a CObject pointer as a return value, substitute a CString. Wherever you see a CObject pointer as a function parameter, substitute a const pointer to char.

CObject* CObArray::GetAt( int <nIndex> ) const;

for example, translates to

CString CStringArray::GetAt( int <nIndex> ) const;

and

void SetAt( int <nIndex>, CObject* <newElement> )

translates to

void SetAt( int <nIndex>, const char* <newElement> )

CStringArray incorporates the IMPLEMENT_SERIAL macro to support
serialization and dumping of its elements. If an array of CStrings is stored to an
archive, either with the overloaded insertion operator or with the Serialize member function, each element is, in turn, serialized.

If you need a dump of individual string elements in the array, you must set the depth of the dump context to 1 or greater.

When a CString array is deleted, or when its elements are removed, string memory is freed as appropriate.

#include <afxcoll.h>