D
darren
Hi
I have an assignment that is in C and, for an API call, asks for a
uint_16 and uint_32 in one of its functions.
In my C++ code i've been using uint16_t and uint32_t for fixed length
integers. Are these two Types compatible?
Also, if i make a struct of a few variables of type uint_xxx_t, can I
be assured that this struct will be the same size on either end of the
wire when sent over a network (note, the hosts may not be the same
platform). I know that some architecture's treat int's as different
lengths, but I thought that is why we use uint_xxx_t, to solve that
poblem.
Thanks
I have an assignment that is in C and, for an API call, asks for a
uint_16 and uint_32 in one of its functions.
In my C++ code i've been using uint16_t and uint32_t for fixed length
integers. Are these two Types compatible?
Also, if i make a struct of a few variables of type uint_xxx_t, can I
be assured that this struct will be the same size on either end of the
wire when sent over a network (note, the hosts may not be the same
platform). I know that some architecture's treat int's as different
lengths, but I thought that is why we use uint_xxx_t, to solve that
poblem.
Thanks