help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Endian Conversion


From: emp1953
Subject: Endian Conversion
Date: Wed, 6 Feb 2008 06:10:06 -0800 (PST)
User-agent: G2/1.0

I developed a ton of code on a Solaris machine in c++ hoping to save
time by not waiting for my linux machine to arrive.
It has several hundred structured messages of varying length from 28
bytes to 2048 bytes, with varying data types.
unsigned char
unsigned short
unsigned int
unsigned long
These messages get populated and sent out a socket to big endian
firmware.
When I received the linux machine I find that it is little endian.
I must convert each data type individually before it goes on the
socket.
Does anyone know of any reliable code that exists that I can easily
plug into my application?

I know about the htols functions etc, I was wondering if someone had
implemented a conversion class or something similar.

Thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]