common typedefs for binary data management


/ Published in: C++
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.