Do you prefer to see something like t_byte*
(with typedef unsigned char t_byte
) or unsigned char*
in code?
I\'m leaning towards
If you're using C99 or newer, you should use stdint.h
for this. uint8_t
, in this case.
C++ didn't get this header until C++11, calling it cstdint
. Old versions of Visual C++ didn't let you use C99's stdint.h
in C++ code, but pretty much every other C++98 compiler did, so you may have that option even when using old compilers.
As with so many other things, Boost papers over this difference in boost/integer.hpp, providing things like uint8_t
if your compiler's standard C++ library doesn't.