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

边栏推荐
猜你喜欢
随机推荐
在北极都可以穿短袖了,温度飙升至32.5℃
2021年12月电子学会图形化二级编程题解析含答案:绘制多边形
取消转义字符(r)
HDU 1027 Ignatius and the Princess II(求由1-n组成按字典序排序的第m个序列)
SwiftUI SQLite教程之了解如何在 SwiftUI 中使用 SQLite 数据库并执行 CRUD 操作(教程含源码)
力扣1206. 设计跳表--SkipList跳表是怎么跳的?
分布式系统与微服务的区别
With a single operation, I improved the SQL execution efficiency by 10,000,000 times!
2021年12月电子学会图形化三级编程题解析含答案:跳高比赛
基于牛顿方法在直流微电网潮流研究(Matlab代码实现)
程序员面试必备PHP基础面试题 – 第十八天
高压直流输电(HVDC)的最优潮流(OPF)(Matlab代码实现)
未来无法预料
身为程序员的我们如何卷死别人?破局重生。
ruoyi若依框架@DataScope注解使用以及碰到的一些问题
C#.NET 国密数字信封
【数据库数据恢复】SqlServer数据库无法读取的数据恢复案例
ubiquant量化竞赛
liunx服务器nohup不输出日志文件的方法
6000 字+,帮你搞懂互联网架构演变历程!








