_ t是什么意思,在C中有什么用处。

作者&投稿:阎窦 (若有异议请与网页底部的电邮联系)

(uint8 *) t表示强制转换成uint8_t类型的指针。uint8应该是无符号8位二进制整型,其实就是unsigned char类型。

将变量t类型强制转换为uint8 *类型,也就是转换成指向uint8类型变量的指针变量。

uint8_t: u无符号,int整形,8占8个字节,_t是一般的后缀。

具体定义:typedef unsigned int uint8_t; 在<stdint.h>里面。

扩展资料:

一般整形对应的*_t类型为:

1字节 uint8_t

2字节 uint16_t

4字节 uint32_t

8字节 uint64_t

头文件内定义:

typedef signed char int8_t;
typedef unsigned char uint8_t;

typedef int int16_t;
typedef unsigned int uint16_t;

typedef long int32_t;
typedef unsigned long uint32_t;

typedef long long int64_t;
typedef unsigned long long uint64_t;

typedef int16_t intptr_t;
typedef uint16_t uintptr_t;



~