我们经常创建C/C++项目中的程序是32位的控制台程序。所以,此处是针对32位的控制台程序(一般都是32位):
typedef unsigned char uint8_t;
typedef signed char int8_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
typedef unsigned long uint64_t;
typedef signed long int64_t;
typedef unsigned int size_t;
typedef int ssize_t;
如果实在不想为了几个数据类型的名称引用整个头文件,那么就如上的代码进行定义计科。