当前位置:网站首页>【C语言】结构体变量数据通过 void* 传入到函数中
【C语言】结构体变量数据通过 void* 传入到函数中
2022-08-05 05:39:00 【嵌入式职场】
目录
1、使用 const unsigned char *buff
1、使用 const unsigned char *buff
#include <stdio.h>
// 定义结构体
typedef struct {
unsigned int m;
unsigned int n;
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
}Peo;
// 接受函数
void func_1(const unsigned char *buff, unsigned int len)
{
// buff强转为 Peo 类型指针
Peo *peo_2 = (Peo*边栏推荐
猜你喜欢
随机推荐
export使用
无法导入torchvision.io.read_image
unity 将Text批量替换为TextMeshProUGUI
Passing parameters in multiple threads
Pytorch distributed parallel processing
Tencent Internal Technology: Evolution of Server Architecture of "The Legend of Xuanyuan"
单片机原理与应用复习
八大排序之快速排序
Get the network input dimensions of the pretrained model
In-depth analysis if according to data authority @datascope (annotation + AOP + dynamic sql splicing) [step by step, with analysis process]
Difference between link and @improt
Next-Generation Parsing Technology - Cloud Parsing
LeetCode练习及自己理解记录(1)
DevOps - Understanding Learning
numpy.random usage documentation
深入分析若依数据权限@datascope (注解+AOP+动态sql拼接) 【循序渐进,附分析过程】
Teach you simple steps to achieve industrial raspberries pie properly installed RS232 USB drive
txt文件英语单词词频统计
设置文本向两边居中展示
uniapp打包次数限制怎么办?只需两步就能解决









