CString::operator +=

const CString& operator +=( const CString& string );
throw( CMemoryException );

const CString& operator +=( TCHAR ch );
throw( CMemoryException );

const CString& operator +=( LPCTSTR lpsz );
throw(
CMemoryException );

Parameters

string

A CString to concatenate to this string.

ch

A character to concatenate to this string.

lpsz

A pointer to a null-terminated string to concatenate to this string.

Remarks

The += concatenation operator joins characters to the end of this string. The operator accepts another CString object, a character pointer, or a single character. You should be aware that memory exceptions may occur whenever you use this concatenation operator because new storage may be allocated for characters added to this CString object.

Example

The following example demonstrates the use of CString::operator +=.

// example for CString::operator +=
CString s( "abc" );
ASSERT( ( s += "def" ) == "abcdef" );

CString OverviewClass MembersHierarchy Chart

See Also   CString::operator +