当前位置:网站首页>宏的运用接续符\
宏的运用接续符\
2022-06-25 09:39:00 【面向大厂编程】
接续符\就是让一行代码可以在在多行上写,在宏的使用上的时候,可以提高代码的可读性
#include <stdio.h>
//定义宏的时候,下一行之前是可以有空格的,但是\之后最好也不要有空格,
#define swap(a,b)\ {
\ int t=a;\ a=b; \ b=t;\ } \
//定义函数宏的时候必须要加上{},或者采用do-while(0)的结构,推荐使用do while形式
//#define 指令只能卸载一行,不管用不用{}。都是这样的,要写到多行,必须用\,将所有的内容拼接到一行中
//虽然也可以不用\,但是这样可读性很差
int main()
{
pri\
ntf("hello");//\后面不能有空格,下一行前面也不能有空格i,
//对于连续单词(函数名,关键字,变量时候)
int a=1,b=2,c=3;
swap(a,b);
return 0;
}
边栏推荐
- NetCore性能排查
- Pytorch_Geometric(PyG)使用DataLoader报错RuntimeError: Sizes of tensors must match except in dimension 0.
- How to do the wechat selling applet? How to apply for applets
- Mengyou Technology: six elements of tiktok's home page decoration, how to break ten thousand dollars in three days
- Kotlin advanced - class
- Byte interview: under what scenario will syn packets be discarded?
- Swift recursively queries the array for the number closest to the specified value
- 字符串 实现 strStr()
- Fluent: target support file /pods runner / pods runner frameworks Sh: permission denied - stack overflow
- Shardingsphere proxy 4.1 sub database and sub table
猜你喜欢

Jetpack compose layout (III) - custom layout

2台三菱PLC走BCNetTCP协议,能否实现网口无线通讯?

Pytorch_Geometric(PyG)使用DataLoader报错RuntimeError: Sizes of tensors must match except in dimension 0.

什么是 CRA

Request&Response有这一篇就够了

2台三菱PLC走BCNetTCP协议,能否实现网口无线通讯?

Nano data World Cup data interface, CSL data, sports data score, world cup schedule API, real-time data interface of football match

String implementation strstr()

The gradle configuration supports the upgrade of 64 bit architecture of Xiaomi, oppo, vivo and other app stores

独步武林,架构选型手册(包含 PDF)
随机推荐
(forwarding articles) after skipping multiple pages, shuttle returns to the first page and passes parameters
Remittance international empowers cross-border e-commerce: to be a compliant cross-border payment platform!
tokenizers>=0.11.1,!=0.11.3,<0.13 is required for a normal functioning of this module,
Ruiji takeout project (II)
Learning notes of rxjs takeuntil operator
Reasons for Meiye to choose membership system
NFC read / write mode development - book summary
Basic use and principle of Minio
Kotlin advanced set
WPF Prism框架
How do wechat applets make their own programs? How to make small programs on wechat?
Is GF Securities reliable? Is it legal? Is it safe to open a stock account?
Houdini图文笔记:Could not create OpenCL device of type (HOUDINI_OCL_DEVICETYPE)问题的解决
String implementation strstr()
Best producer consumer code
[MySQL learning notes 20] MySQL architecture
我希望按照我的思路盡可能將canvas基礎講明白
I'm afraid of the goose factory!
CYCA 2022少儿形体礼仪初级师资班 深圳总部站圆满结束
ShardingSphere-Proxy 4.1 分库分表