<ma********@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
Alright , no need to break you heads, My code was doing whats shown
below in a loop, so it would flip the endian-ness everytime , Just so
happened the output files I looked up were the ones where the
endian-ness was reset.
hope ya'll have a good day ,
just wondering though WHY this little to big and big to little isn't
part of some standard library !
Because it's easy enough to write such a macro/function yourself if you
need one?
<OTIf your system supports sockets, which nearly all do these days,
then you'll almost certainly find the macros ntohl(), htonl(), htons(),
and ntohs() available in some header. These will convert between host
(native) and network (big-endian) byte orders if they differ. On POSIX
systems, you're likely to find them in <netinet/in.h>; I don't know
where they live on Windows systems.
If you don't have sockets, there's still good odds that the
implementation provides the macros bswap(), byteswap(), or something
similar. These, however, have the property that, if used on a
big-endian system, they will swap your data to little-endianness, which
probably isn't what you want. </OT>
S
--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking
--
Posted via a free Usenet account from
http://www.teranews.com