Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-08-18 12:22:28

You could do the following:

a) serialize your gigantic character array.
b) For each pointer you want to serialize serialize the displacement from
the front of your array

    ?; // save to huge array using binary object
    unsigned int disp;
    disp = A - file.ptr;
    ar << disp;
    disp = B - file.ptr;

    ?; // load huge array using binary object
    unsigned integer disp;
    ar >> disp
    a = file.ptr + disp;
    ar >> disp
    a = file.ptr + disp;

Good Luck

Robert Ramey

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at