Posted By

yuconner on 08/18/06


Tagged

binary typedef byte


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

yuconner
copyleft
khouser


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.