Afficher un message
Vieux 01/07/2008, 00h25   #1
darren
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut is the syntax for fixed-length integers the same for C and C++?

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
  Réponse avec citation
 
Page generated in 0,04294 seconds with 9 queries