When writing cross-platform C++ there are a few things you might want to think of.
First of all, the size of most types varies. A notable exception is char, which is always one byte. There is no integral type that must be larger than 1 byte. A char, short int, int, long int and a long long int can all have the same size. You can however, be sure that long long int is of the same or larger size than a long int, that a long int is of the same or larger size than an int, and so on.
The (u|)int(8|16|32|64)_t types are optional (they aren't necessarily defined).
A byte is not always 8 bits (in C++ and computer systems in general). If sizeof(int) is equal to 4, you can store 4 * CHAR_BIT (found in <climits>) bits in an int variable. Most computer systems use a word size (byte size) of 8, 16 or 32, but this isn't always the case. In C++ the size of a byte is always 8 or more. There is no type that's bound to be have a specific bit size and isn't optional. The majority of computers have a word size of 8 so you may want to ignore this issue. An octet is a byte of 8 bits. So instead of saying kilobyte or kibibyte when you mean 8192 bits it'd be better if you say kibioctet. Of course, this would never catch on.
Computers use different byte orders, this is referred to as endianness. x86 processors are little endian, meaning an integer with the value 1 with a byte size of 2 is stored in this order in the processor and in memory: 00000001 00000000. In a big endian system with the same word size (8) as x86, the same integer would be stored in reverse order: 00000000 00000001. Then there's middle-endian, which is simply messed up. Middle-endian processors are very uncommon so you can probably ignore them safely. Endianness is a problem when you write data to a file and then transfer that file to a computer with other endianness. To counter this, you should swap bytes when reading and writing files in either big endian systems or little endian systems. Big endian is also known as network order, as many network protocols use it.
C++ does not enforce a certain text encoding. When doing I/O make sure your text is in the right encoding. win32 by default uses an encoding derived from the language of the operating system (Swedish or English = CP-1252, Polish = Windows-1250, etc.) or set manually by the user, but there are special functions which use UTF-16 instead.