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::operators <<, >>
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  friend CArchive& operator <<( CArchive& ar, const CString& string );
  throw(CArchiveException);
  friend CArchive& operator >>( CArchive& ar, CString& string );
  throw(CArchiveException);
  friend CDumpContext& operator <<( CDumpContext& dc,
                                  const CString& string );
 
  Remarks
 
  The CString insert (<<) operator supports diagnostic dumping and storing
  to an archive. The extract (>>) operator supports loading from an
  archive.
 
  The CDumpContext operators are valid only in the Debug version of the
  Microsoft Foundation Class Library.
 
  Example
 
  // Operator <<, >> example
      extern CArchive ar;
      CString s( "abc" );
   #ifdef _DEBUG
      afxDump << s;  // Prints the value (abc)
      afxDump << &s;  // Prints the address
   #endif
 
      if( ar.IsLoading() )
        ar >> s;
      else
        ar << s;
 
 
 
                                     -♦-