CString::operator +

Use this concatenation operator to join 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.

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 );

At a Glance

Header File Afx.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CString Overview, CString Operators, Simple Value Types, CString::operator +=