当前位置:网站首页>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;
}
边栏推荐
- In programming languages, the difference between remainder and modulo
- Leetcode 93 IP addresses
- Usage of placeholder function in Tensorflow
- 简单问题窥见数学
- Metasploit常用命令、技术功能模块
- SecureCRT background color
- 18-GuliMall 压力测试与性能监控
- Common commands and technical function modules of Metasploit
- FileZilla搭建FTP服务器图解教程
- SecureCRT sets the timeout period for automatic disconnection
猜你喜欢
Domestic mobile phone manufacturers once fought for it, but now it is the first to collapse...
Several ways to draw timeline diagrams
阿里云架构师金云龙:基于云XR平台的视觉计算应用部署
2022年中国第三方证券APP创新专题分析
CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source
Reinforcement Learning Weekly Issue 57: DL-DRL, FedDRL & Deep VULMAN
Simple questions peek into mathematics
How do task flow executors work?
abstract class or interface
xctf攻防世界 Web高手进阶区 ics-05
随机推荐
用户代码未处理MetadataException
xctf攻防世界 Web高手进阶区 shrine
JS–比想象中简单
【测试】语句覆盖,判定覆盖,条件覆盖,路径覆盖
Arcgis工具箱无法使用,显示“XML包含错误“的解决方法
OKR 锦囊妙计
重要的不是成为海贼王,而是像路飞一样去冒险
十步以内,用小程序快速生成App!
一文让你快速了解隐式类型转换【整型提升】!
Bean life cycle
Presto Event Listener开发
Usage of placeholder function in Tensorflow
openGauss数据库基本操作(超详细)
SecureCRT background color
面试官:Redis 大 key 要如何处理?
好未来,想成为第二个新东方
Technology Sharing | How to Handle Header Cookies in Interface Automation Testing
简单问题窥见数学
Solution: Edu Codeforces 109 (div2)
unit test