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

边栏推荐
猜你喜欢

【899. 有序队列】

Ark server opening tutorial win

Windows服务器如何防止黑客入侵的安全设置

问题7:功能测试花瓶用例

Three key expectations for the crypto market in August Price moves north?Still expected to be in turmoil

devops-3:Jenkins增加静态节点

How to prevent hacking Windows server security Settings

2021年12月电子学会图形化四级编程题解析含答案:森林运动会

After the cnpm installation is successful, the prompt is not an internal and external command, nor is it a runnable command solution

神经网络,凉了?
随机推荐
语音识别新一轮竞争打响,自然对话会是下一个制高点吗?
证实了,百度没有快照了
神经网络,凉了?
技术分享 | 接口自动化测试如何搞定 json 响应断言?
动态链接库.dll、.so和静态库.a,cmake指令
MATLAB gcf图窗保存图像,黑色背景/透明背景
如何用二分法搜索、查找旋转数组中是否含有某个(目标)值? leetcode 81.搜索旋转排序数组
2021年12月电子学会图形化一级编程题解析含答案:放学
JS每晚24:00更新某方法
2021年12月电子学会图形化二级编程题解析含答案:绘制多边形
分享一款免费OPC UA服务器
指令重排以及案例
ruoyi若依框架@DataScope注解使用以及碰到的一些问题
JS手写call apply bind (详细)(面试)
How to prevent hacking Windows server security Settings
在北极都可以穿短袖了,温度飙升至32.5℃
程序员面试必备PHP基础面试题 – 第十八天
Ark server opening tutorial win
问题4:什么是缺陷?你们公司缺陷的优先级是怎样划分的?
开源一夏 | 阿里云物联网平台之极速体验