当前位置:网站首页>[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:

边栏推荐
猜你喜欢
随机推荐
Js array method is summarized
2021年12月电子学会图形化三级编程题解析含答案:数星星
PWA 应用 Service Worker 缓存的一些可选策略和使用场景
【指针内功修炼】函数指针 + 函数指针数组 + 回调函数(二)
基于牛顿方法在直流微电网潮流研究(Matlab代码实现)
无内鬼,来点干货!SQL优化和诊断
2021年12月电子学会图形化一级编程题解析含答案:下雨
STM32H743VIT6配置ADC为1M采样率
内心的需求
2021年12月电子学会图形化三级编程题解析含答案:分身术
又有大厂员工连续加班倒下/ 百度搜狗取消快照/ 马斯克生父不为他骄傲...今日更多新鲜事在此...
冒烟测试冒烟测试
一个在浏览器中看到的透视Cell实现
FATFS | 中文显示 | 长文件名
如何用二分法搜索、查找旋转数组中是否含有某个(目标)值? leetcode 81.搜索旋转排序数组
php中接口、抽象类以及接口和抽象类区别详解
js数组方法总结
证实了,百度没有快照了
leetcode:899. 有序队列【思维题】
HDU 1160 FatMouse's Speed(最长递减子序列变形)









