endian « byte « C Data Type Q&A

Home
C Data Type Q&A
1.binary
2.bit
3.byte
4.char
5.character
6.decimal
7.Development
8.float
9.hex
10.integer
11.prime
12.random
13.struct
C Data Type Q&A » byte » endian 

1. How to write a 24 bit message after reading from a 4-byte integer on a big endian machine (C)?    stackoverflow.com

I am constructing a message to send a 24-bit number over the network. For little endian machines, the code is (ptr is the pointer to the message buffer):

*ptr++ = (num >> 16) ...

2. Traversing struct in network byte order(Big Endian) --- C Language    stackoverflow.com

I have a series of structs stored in network byte order. I want to retrieve them. How can I do it. structs of this type are stored in the file. I want ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.