Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CString::operator +=
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  void operator +=( const CString& string )
  throw( CMemoryException );
  void operator +=( char ch )
  throw( CMemoryException );
  void operator +=( const char* psz )
  throw( CMemoryException );
 
  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.
 
  You must ensure that the maximum length limit is not exceeded. The Debug
  version of the Microsoft Foundation Class Library asserts when it
  detects strings that are too long.
 
  Example
 
  CString s( "abc" );
  ASSERT( ( s += "def" ) == "abcdef" );
 
 
  See Also
 
  CString::operator +
 
 
                                     -♦-