当前位置:网站首页>[Code Hoof Set Novice Village 600 Questions] Define a function as a macro
[Code Hoof Set Novice Village 600 Questions] Define a function as a macro
2022-08-03 15:33:00 【Sandm*】
Title link:
Things to solve the problem:
Using macros to define functions is different from normal function definitions,
In the macro definition,
Because it's a text replacement,
So the content of the macro definition is theoretically one line,
But since we're using a macro to define a function,
So put \
at the end of each lineMakes all lines above and below theoretically one line
The return value of the macro-defined function is not realized by the keyword return,
Instead, replace the essence with normal macros,
Just add a variable directly at the end of the function defined by the macro,
That is, write the value to be returned separately
Note the proper use of parentheses
Reference code:
边栏推荐
猜你喜欢
随机推荐
程序员面试必备PHP基础面试题 – 第十九天
LyScript 验证PE程序开启的保护
聊聊这个SaaS领域爆火的话题
FATFS | 中文显示 | 长文件名
自己悦表存心
一次做数据报表的踩坑经历,让我领略了数据同步增量和全量的区别
2021年12月电子学会图形化二级编程题解析含答案:消灭蝙蝠
The general trend, another key industry related to Sino-US competition, has reached a critical moment
神经网络,凉了?
sql注入之盲注(纯原创)
php类的析构函数:__destruct
js数组方法总结
接口测试主要测试什么?
程序员面试必备PHP基础面试题 – 第二十一天
问题6:下拉框测试点
【码蹄集新手村600题】将一个函数定义宏
一通骚操作,我把SQL执行效率提高了10000000倍!
ubiquant量化竞赛
ruoyi若依框架@DataScope注解使用以及碰到的一些问题
C#.NET 国密数字信封