Endianness in C/C++

Programming, for all ages and all languages.
Post Reply
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Endianness in C/C++

Post by Perica »

..
Last edited by Perica on Tue Dec 05, 2006 9:33 pm, edited 1 time in total.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Endianness in C/C++

Post by df »

yes it will work.

i dont know if the standards define it, more i think its just a byproduct of how all cpus work. 'in memory' its just stored that way in the register (ie: sparc64, x86 etc). now how true that is for a stack machine i don tknow.

but your code will produce the same result on sparc64 as it will on x86 and alpha and mips.
-- Stu --
Post Reply