i want to write an STL object to a file using binary stream

i have ( hash_map H,S ; ) i initielizing H using class interfase .
then write H to file , read from the same file into S

after this , S and H have the same data and H.size==S.size
but at the end of the program i get assertion faillure:
_BLOCK_TYPE_IS_VALID(phead->nBlockUse)

i asume the problem is that S was writen-to without using
its class interface and that interferes with its destruction .
is this the case ?

i thought about using the  C'tor of  S ..but couldn't see how ,
if only there was a method of hash_map that returns a fixed
array of data that can be used later to construct a new object
like in the string case  .

how do i get this done ? i need to write a large STL object to file
so that program memory usage wouldn't be too large ..

--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to