当前位置:网站首页>【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*边栏推荐
猜你喜欢
随机推荐
如何将.asd恢复为Word文档
js 使用雪花id生成随机id
Next-Generation Parsing Technology - Cloud Parsing
After docker is deployed, mysql cannot connect
transport layer protocol
Collision, character controller, Cloth components (cloth), joints in the Unity physics engine
BIO,NIO,AIO实践学习笔记(便于理解理论)
lingo入门——河北省第三届研究生建模竞赛B题
系统基础-学习笔记(一些命令记录)
浏览器兼容汇总
VSCode编写OpenCV
Tencent Internal Technology: Evolution of Server Architecture of "The Legend of Xuanyuan"
Detailed explanation of ten solutions across domains (summary)
What is Alibaba Cloud Express Beauty Station?
错误记录集锦(遇到则记下)
lingo入门——河北省第三届研究生建模竞赛B题
vscode笔记
格式化代码缩进的小技巧
【FAQ】CCAPI兼容EOS相机列表(2022年8月 更新)
Nacos配置服务的源码解析(全)









