memory overwrites: the fastest way to detect/remove them is by using automatic diagnostic tools, like BoundsChecker (www.numega.com) or Purify (www.rational.com) 2) serializing different CObject-derived classes from list: just use operator << with pointers to objects. MFC is smart enough to write metadata containing type information to archive. You don't need to write type information yourself.
// write
// p points to something derived from CBaseClass
CBaseClass *p = list.GetHead();
ar << p;
// ...
// read
CBaseClass *p;
ar >> p;
// now p contains address of dynamically created
// object derived from CBaseClass. The type is
// correctly restored. p should be deleted with a
// call to plain delete when you no longer need
// this object:
delete p;
Tomasz Sowinski -- http://www.shooltz.com