Sending float Windows <-> Linux

Started by
10 comments, last by Tribad 11 years, 9 months ago
The size of char in C and C++ is well defined to be the smallest addressable unit of memory. Unless you're running on some exotic DSP architecture, where everything is a full word in size, a char is 8 bits. And sizeof(char) is defined to be 1 -- that's the definition of what "sizeof" is expressed in.
If you believe that the only change you made was changing from "char" to "uint8_t" and it suddenly changed struct alignment, then I suggest you look a lot deeper for the real cause and solution.
enum Bool { True, False, FileNotFound };
Advertisement
Sign extent?
A signed data type is extended into a larger format, e.g. from byte to int or int to long, by copying the sign (MSB) bit into the new upper bits of the new format. This is valid for all all integer datatypes.

This topic is closed to new replies.

Advertisement