[quote name='KnolanCross' timestamp='1350784084' post='4992326']
sizeof(Player) should be sizeof(struct Player)
There is no difference between those two expressions, unless you're using plain C and do not have a typedef for struct Player to Player. And, if you don't have that, then the code wouldn't even compile.
[/quote]
Good to know, as I said, I am a C programmer, no CPP.
[quote name='KnolanCross' timestamp='1350784084' post='4992326']
Endianness problems got to do with how each machine deals with the byte order, for instance, if you have an int (4 bytes) with the value 1 it can be:
00 00 00 01
or
00 00 01 00
Depending on the machine.
from wikipedia:
"Well-known processor architectures that use the little-endian format include x86 (including x86-64), 6502 (including 65802, 65C816), Z80 (including Z180, eZ80 etc.), MCS-48, 8051, DEC Alpha, Altera Nios, Atmel AVR, SuperH, VAX, and, largely, PDP-11."
So we can say all commercial computers (x86 and x64) use little endian so there is not much of a problem here right?
[/quote]
Personally I never had problem with endianess, so I can't tell any popular processor having a different endianess.