We Recommend

C++ The Core Language C++ The Core Language
C++: The Core Language is for C programmers transitioning to C++. It's designed to get readers up to speed quickly by covering an essential subset of the language. The subset consists of features without which it's just not C++, and a handful of others that make it a reasonably useful language.


Posted By

yuconner on 08/18/06


Tagged

binary typedef byte


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

yuconner
copyleft


common typedefs for binary data management


Published in: C++ 


Example: Useful to avoid use of char type as "byte, 8 bits type" and so (valid for c language too)

  1. typedef unsigned char Uint8;
  2. typedef signed char Sint8;
  3. typedef unsigned short Uint16;
  4. typedef signed short Sint16;
  5. typedef unsigned int Uint32;
  6. typedef signed int Sint32;
  7.  
  8. typedef long long Sint64;
  9. typedef unsigned long long Uint64;
  10.  
  11. //typedef unsigned char byte;

Report this snippet 

You need to login to post a comment.