MSDN中说明了序列化的方法: Five main steps are required to make a class serializable. They are listed below and explained in the following sections: Deriving your class from CObject (or from some class derived from CObject). Overriding the Serialize member function. Using the DECLARE_SERIAL macro in the class declaration. Defining a constructor that takes no arguments. Using the IMPLEMENT_SERIAL macro in the implementation file for your class. If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
Five main steps are required to make a class serializable. They are listed below and explained in the following sections: Deriving your class from CObject (or from some class derived from CObject). Overriding the Serialize member function. Using the DECLARE_SERIAL macro in the class declaration. Defining a constructor that takes no arguments. Using the IMPLEMENT_SERIAL macro in the implementation file for your class. If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
但是为什么在序列化的时候可以使用对象进行 << 操作呢?