A
Alfonso Morra
I have the following data types:
typedef union {
long l ;
double f;
char* s ;
void* p ;
} Value ;
typedef struct {
int id ;
char *label
Value value ;
size ;
}StructA ;
Does anyone know how I can serialize StructA into a raw memory block and
calculate the number of bytes of the memory block?
I am quite suprised that no one seems to know how to do this, and I have
been given all sorts of incorrect answers and suggestions in the
past. Someone out there should surely know how to do this - if even they
don't know how to do it, but can point me to a reference (my Google
searches have not come up with anything remotely useful) - I'd be most
grateful
typedef union {
long l ;
double f;
char* s ;
void* p ;
} Value ;
typedef struct {
int id ;
char *label
Value value ;
size ;
}StructA ;
Does anyone know how I can serialize StructA into a raw memory block and
calculate the number of bytes of the memory block?
I am quite suprised that no one seems to know how to do this, and I have
been given all sorts of incorrect answers and suggestions in the
past. Someone out there should surely know how to do this - if even they
don't know how to do it, but can point me to a reference (my Google
searches have not come up with anything remotely useful) - I'd be most
grateful