当前位置:网站首页>【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*边栏推荐
猜你喜欢
随机推荐
文件内音频的时长统计并生成csv文件
Tips for formatting code indentation
【8】Docker中部署Redis
LaTeX uses frame to make PPT pictures without labels
BIO, NIO, AIO practical study notes (easy to understand theory)
## 简讲protobuf-从原理到使用
盒子模型大详解
Transformer interprets and predicts instance records in detail
长度以及颜色单位基本概念
Matplotlib绘图笔记
MyCat配置文件
Native JS takes you to understand the implementation and use of array methods
在小程序中关于js数字精度丢失的解决办法
Difference between link and @improt
云计算基础-学习笔记
lingo入门——河北省第三届研究生建模竞赛B题
lingo入门——河北省第三届研究生建模竞赛B题
人人AI(吴恩达系列)
Browser Storage for H5
Vim tutorial: vimtutor









