CArchive::operator <<

friend CArchive& operator <<( CArchive& ar, const CObject* pOb );
throw( CArchiveException, CFileException );

CArchive& operator <<( BYTE by );
throw( CArchiveException, CFileException );

CArchive& operator <<( WORD w );
throw( CArchiveException, CFileException );

CArchive& operator <<( int i );
throw( CArchiveException, CFileException );

CArchive& operator <<( LONG l );
throw( CArchiveException, CFileException );

CArchive& operator <<( DWORD dw );
throw( CArchiveException, CFileException );

CArchive& operator <<( float f );
throw( CArchiveException, CFileException );

CArchive& operator <<( double d );
throw( CArchiveException, CFileException );

Return Value

A CArchive reference that enables multiple extraction operators on a single line.

Remarks

Stores the indicated object or primitive type to the archive.

If you used the IMPLEMENT_SERIAL macro in your class implementation, then the insertion operator overloaded for CObject calls the protected WriteObject. This function, in turn, calls the Serialize function of the class.

Example

long l;
int i;
extern CArchive ar;
if( ar.IsStoring() )
  ar << l << i;

CArchive OverviewClass MembersHierarchy Chart

See Also   CArchive::WriteObject, CObject::Serialize