当前位置:网站首页>宏的运用接续符\
宏的运用接续符\
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;
}
边栏推荐
- Pytorch_Geometric(PyG)使用DataLoader报错RuntimeError: Sizes of tensors must match except in dimension 0.
- SparseArray details
- Pytorch_ Geometric (pyg) uses dataloader to report an error runtimeerror: sizes of tenants must match except in dimension 0
- NFC read / write mode development - book summary
- Cocopod error failed: undefined method `map 'for nil:nilclass
- How to make a self-service order wechat applet? How to do the wechat order applet? visual editing
- Kotlin advanced - class
- DDS learning notes of opendds
- SQL to object thinking vs SQL of object thinking
- Mongodb's principle, basic use, clustering and partitioned clustering
猜你喜欢

Unique Wulin, architecture selection manual (including PDF)

Can two Mitsubishi PLC adopt bcnettcp protocol to realize wireless communication of network interface?

什么是 CRA

Free platform for wechat applet making, steps for wechat applet making

Shardingsphere proxy 4.1 Sous - base de données sous - table

Create menu file

How to do the wechat selling applet? How to apply for applets

Kotlin advanced generic

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

MongoDB的原理、基本使用、集群和分片集群
随机推荐
瑞吉外卖项目(二)
Nano data World Cup data interface, CSL data, sports data score, world cup schedule API, real-time data interface of football match
MySQL create given statement
Tiktok brand goes to sea: both exposure and transformation are required. What are the skills of information flow advertising?
Ruiji takeout project (II)
Android database security: after the user exits, the transaction rollback log still stores relevant data information
Bug- solve the display length limitation of log distinguished character encoding (edittext+lengthfilter)
链表 删除链表中的节点
Free platform for wechat applet making, steps for wechat applet making
Rxjs TakeUntil 操作符的学习笔记
Kotlin advanced - class
Computational Thinking and economic thinking
i++ 和 ++i的真正区别
[buuctf.reverse] 117-120
Consul的基本使用与集群搭建
How do wechat applets make their own programs? How to make small programs on wechat?
Mengyou Technology: six elements of tiktok's home page decoration, how to break ten thousand dollars in three days
Bitmap is converted into drawable and displayed on the screen
Match a mobile number from a large number of mobile numbers
MySQL source code reading (II) login connection debugging