Try the code below. I've not tested it, so there might be some errors, but you should get the idea. I assume that Start is a member of CDatenbankDoc.
int CDatenbankDoc::GetLinkedListSize()
{
// This function returns the length of the linked list whose 1st element
// is pointed by the Start member.
// The implementation is left as an exercice
}
void CDatenbankDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar << GetLinkedListSize(Start) ; // save size of linked list
Actual = Start;
while (Actual)
{
ar << Actual->name;
ar << Actual->adresse;
...
Actual = Actual->next;
}
}
else
{
int size ;
ar >> size ; // get size of linked list
Node *previous = NULL ;
for (int i = 0; i < size; i++)
{
Node *Actual = new Node; // assuming Node constructor inits
// pointers to Null
if (previous)
previous->next = actual ;
Actual->previous = previous ;
if (i == 0)
Start = Actual ;
// beware, the order of serialisation and deserialisazion must
// be the same during reading and writing which is not the case
// in the code you posted !!!
ar >> Actual->name;
ar >> Actual->adresse;
...
previous = Actual ;
}
}
}
A better solution would be to encapsulate your linked list into a class that has a Serialize member fonction.