Original Post
inline void CMemento::Set(const unsigned int a_Data)
{
m_Data.resize(m_Data.size() + sizeof(unsigned int));
unsigned char* p = &m_Data.back() - sizeof(unsigned int);
p = a_Data;
}
(This doesn''t work BTW, I''ve never been string with pointer syntax)
I''m attempting to write a class that can store a classes data in a standard unsigned char* array. This data will be then used for saves and networking. If you know a better way of pushing arbitrarily sized data in to a std::vector I''d live to hear about it...
Chris Brodie
http:\\fourth.flipcode.com