当前位置:网站首页>C 在函数声明前加typedef
C 在函数声明前加typedef
2022-08-09 21:54:00 【ma_de_hao_mei_le】
友链
在学习驱动开发的时候看到下面这种代码
typedef
NTSTATUS
DRIVER_INITIALIZE (
_In_ struct _DRIVER_OBJECT *DriverObject,
_In_ PUNICODE_STRING RegistryPath
);
一开始看感觉很奇怪,不知道为啥前面要加一个typedef,后来网上搜了搜,看到下面这个问答
https://stackoverflow.com/questions/4295432/typedef-function-pointer

顿时就明白怎么回事了,我来自己举个例子
#include <stdio.h>
typedef int myfunc(int a);
myfunc b;
int main() {
printf("%d\n", b(123));
return 0;
}
int b(int a) {
return a;
}

边栏推荐
- Bean life cycle
- 1215 – Cannot add foreign key constraint
- Basic JSON usage
- JS解混淆-AST还原案例
- [Microservice~Nacos] Configuration Center of Nacos
- 论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
- JSON 基本使用
- Evolution of MLOps
- Technology Sharing | How to use the JSON Schema mode of interface automation testing?
- JS–比想象中简单
猜你喜欢

How to Make Your Company Content GDPR Compliant

肝通宵写了三万字把SQL数据库的所有命令,函数,运算符讲得明明白白讲解,内容实在丰富,建议收藏+三连好评!

leetcode 刷题日记 计算右侧小于当前元素的个数

Converting angles to radians
![[Implementation of the interface for adding, deleting, checking, and modifying a double-linked list]](/img/49/ebedcd4d27aa608360ac17e504f36d.png)
[Implementation of the interface for adding, deleting, checking, and modifying a double-linked list]

注意力引导网络用于视网膜图像分割

大型分布式存储方案MinIO介绍,看完你就懂了!

TRUNCATE表之后空间未释放

ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes

Js fifteen interview questions (with answers)
随机推荐
【EF】数据表全部字段更新与部分字段更新
SQLi-LABS Page-2 (Adv Injections)
js array object deduplication
Flask introductory learning tutorial
华为鸿蒙3.0的野望:技术、应用、生态
腾讯继续挥舞降本增效“大刀”,外包员工免费餐饮福利被砍了
xctf攻防世界 Web高手进阶区 ics-05
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
SecureCRT background color
Domestic mobile phone manufacturers once fought for it, but now it is the first to collapse...
18-GuliMall 压力测试与性能监控
Multiple reasons for MySQL slow query
级联下拉菜单的实现「建议收藏」
注意力引导网络用于视网膜图像分割
Several ways to draw timeline diagrams
How to Make Your Company Content GDPR Compliant
【微服务~Nacos】Nacos服务提供者和服务消费者
Usage of placeholder function in Tensorflow
Flask's routing (app.route) detailed
README_Albumentations