Binary Saving

From: Edoardo Spelta (espelta@GOEMON.POLITO.IT)
Date: 06/04/98

I am in need of storing some complex data structure ina bonary file,
but it seems that it doesn't store (or maybe read) correctly to/from the

if the struct is something like this:
        struct some_struct {
                long bitvector;
                char *name;

and a var is declared as:
        struct some_struct object;

should i store it with:

        fwrite(&object,sizeof(struct some_data),1,fl);

Is it correct ?

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST