CString::operator <<, >>

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 insertion (<<) operator supports diagnostic dumping and storing to an archive. The extraction (>>) operator supports loading from an archive.

The CDumpContext operators are valid only in the Debug version of the Microsoft Foundation Class Library.

Example

The following example demonstrates the use of CString::operator <<, >>.

// example for CString::operator <<, >>
    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;

CString OverviewClass MembersHierarchy Chart

See Also   CDumpContext