cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How to convert a negative number using n
How to convert a negative number using ntohl?
Dec 6, 2013 at 10:37pm UTC
chrisben
(99)
Hi,
I receive a negative number but in big endian order. ntohl seems work for unsigned only.
Is there a method for me to translate it back to the original negative number from big endian?
Thanks
Chris
Dec 6, 2013 at 10:55pm UTC
naraku9333
(2163)
Have you tried sending and receiving the negative number?
http://ideone.com/zZFtvC
Dec 7, 2013 at 1:27am UTC
chrisben
(99)
i received from others
Topic archived. No new replies allowed.