Wednesday, April 25, 2012

Testing for Endian-ness (byte order)

Although very unlikely that you need to test endian-ness (or byte order) in Qt applications, you may take advantage of some macros available to help knowing how the system the application is running under will store data in memory.


So if you're developing an application dealing with low level aspects of networking (when endian-ness is very important) or any other application where requirements call for low-level details, and portability is key for you, keep in mind the good friends of yours: Q_BYTE_ORDER, Q_LITTE_ENDIAN and Q_BIG_ENDIAN

No comments:

Post a Comment