質問 class A : public CObject{ virtual void Serialize( CArchive& ar ) ; } class B : public CObject{ virtual void Serialize( CArchive& ar ) ; }
template< typename DATA > class CM : public CObject { private: CMap< int, int ,DATA, DATA > m_map; public: virtual void Serialize( CArchive& ar ) ; } CM< A > CM_A; CM< B > CM_B;
template < typename DATA > class CN : public CObject { private: CArray < DATA, DATA > m_array; public: virtual void Serialize( CArchive& ar ) ; }
>>195 バーカ。 bool は Visual C++ 4.2 では 4 バイト、Visual C++ 5.0 以降では 1 バイト。
In Visual C++4.2, the Standard C++ header files contained a typedef that equated bool with int. In Visual C++ 5.0 and later, bool is implemented as a built-in type with a size of 1 byte. That means that for Visual C++ 4.2, a call of sizeof(bool) yields 4, while in Visual C++ 5.0 and later, the same call yields 1.