casting - portable signed/unsigned byte cast,C++ -


I am using unsigned byte (int8_t) cast sign to pack byte.

  uint32_t (Uint8_t (byte)) & lt; & Lt; N  

This works on Intel Linux using GCC. Is portable for other platforms / compilers, for example PowerPC? Is there a better way to do it? It is not possible to use bits in my case. I am using boost / cstdint.hpp

> Boost Integer Library So, yes, typingfesses are portable (cross-platform.) The purpose of the header is to implement C99's CDR stdint.h functionality.

From:

Header TypingFeaf is useful for writing portable code that requires some integer width, all typingfix namespaces are in progress.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -