C++ (Qt)MyStream stream;..stream << theB.a << theB.b << theB.s; // сериализуем объект класса B...stream << theA.b; // сериализуем объект класса A..
C++ (Qt)template <class T>MyStream & operator << ( MyStream & stream, const QVector<T> & vec ){...}
C++ (Qt)#include "B.h"