CString::operator +

This concatenation operator joins two strings and retrieve the resulting CString object. One of the two argument strings must be a CString object. The other can be a character pointer or a character. You should be aware that memory exceptions may occur whenever you use the concatenation operator since new storage may be allocated to hold temporary data.

At a Glance

Header file: Afx.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

friend CString operator +( const CString& string1, const CString& string2 );
throw( CMemoryException );

friend CString operator +( const CString& string, TCHAR ch );
throw( CMemoryException );

friend CString operator +( TCHAR ch, const CString& string );
throw( CMemoryException );

friend CString operator +( const CString& string, LPCTSTR lpsz );
throw( CMemoryException );

friend CString operator +( LPCTSTR lpsz, const CString& string );
throw( CMemoryException );

See Also

CString::operator +=