当前位置:网站首页>指针常量与常量指针 巧记
指针常量与常量指针 巧记
2022-08-05 05:24:00 【毕竟是shy哥】
从右往左看,const右边是谁,谁就不能改变!!
- 怎么读呢,const表示常量,*表示指针,按照先后顺序连起来读就可以了。
- 常量指针
int const * p1=&number;
速记: p1表示指针,*p1表示内容,即“const内容”,内容是常量,即内容不可以修改(可以修改p1的指向)
2. 指针常量
int * const p1=&number;
速记:p1是指针,const p1,即“常量p1”,也就是p1不可以修改,即p1的指向不可以修改(可以通过p1修改其内容)
边栏推荐
- 618, you may be able to wake up a little bit
- System basics - study notes (some command records)
- link 和@improt的区别
- Network Protocol Fundamentals - Study Notes
- selenium模块的操作之拉钩
- 逻辑卷创建
- wc、grep、tar、vi/vim
- Four ways to obtain Class objects through reflection
- Cloud Computing Basics - Study Notes
- Q 2020, the latest senior interview Laya soul, do you know?
猜你喜欢
路由器和静态路由的配置
Take you in-depth understanding of cookies
DisabledDate date picker datePicker
Q 2020, the latest senior interview Laya soul, do you know?
DevOps process demo (practical record)
云计算基础-学习笔记
BIO,NIO,AIO实践学习笔记(便于理解理论)
el-progress implements different colors of the progress bar
Mina disconnects and reconnects
BIO, NIO, AIO practical study notes (easy to understand theory)
随机推荐
网络排错基础-学习笔记
DevOps流程demo(实操记录)
Mina断线重连
js dynamically get screen width and height
网络层协议介绍
js 使用雪花id生成随机id
Alibaba Cloud Video on Demand
User and user group management, file permission management
监控系统的内卷,有什么讲究?
el-autocomplete使用
Programmers should understand I/O this way
VRRP overview and experiment
selenium learning
transport layer protocol
The hook of the operation of the selenium module
Complete mysql offline installation in 5 minutes
el-autocomplete use
ALC experiment
Transformer详细解读与预测实例记录
CIPU, what impact does it have on the cloud computing industry?