bool question?
-
im trying to serialize something but this works; ar << m_bool; and this doesn`t: ar >> m_bool; why?
-
im trying to serialize something but this works; ar << m_bool; and this doesn`t: ar >> m_bool; why?
-
i notice in "afx.h" that the CArchive class does not have an explicit override for '<< bool' so this may be the problem. try casting it like this (as an experiment): ar << (int)m_bool; ar >> (int&)m_bool;
thanks it compiles just let me check if it works fine:-D
-
thanks it compiles just let me check if it works fine:-D
As already explained, this was just an experiment. For "the real stuff" you should provide your own streaming operators like: CArchive& operator<<(CArchive&, bool); CArchive& operator>>(CArchive&, bool&);
-
As already explained, this was just an experiment. For "the real stuff" you should provide your own streaming operators like: CArchive& operator<<(CArchive&, bool); CArchive& operator>>(CArchive&, bool&);
thanks i just did that. :-D