当前位置:网站首页>指针常量与常量指针 巧记
指针常量与常量指针 巧记
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修改其内容)
边栏推荐
- Four ways to obtain Class objects through reflection
- H5开发调试-Fiddler手机抓包
- RAID磁盘阵列
- 浏览器兼容汇总
- Unity realizes first-person roaming (nanny-level tutorial)
- Next-Generation Parsing Technology - Cloud Parsing
- VLAN is introduced with the experiment
- In-depth Zabbix user guide - from the green boy
- The size of the screen adaptation
- [ingress]-ingress exposes services using tcp port
猜你喜欢
随机推荐
H5 的浏览器存储
[Problem has been resolved]-Virtual machine error contains a file system with errors check forced
单臂路由实验和三层交换机实验
What is the website ICP record?
LeetCode中常用语言的一些基本方法记录
通过反射获取Class对象的四种方式
sql server duplicate values are counted after
D39_ coordinate transformation
Configuration of routers and static routes
wc, grep, tar, vi/vim
Advantages of overseas servers
ALC实验
错误记录集锦(遇到则记下)
多行文本省略
LeetCode练习及自己理解记录(1)
js判断文字是否超过区域
[ingress]-ingress使用tcp端口暴露服务
What impact does CIPU have on the cloud computing industry?
干货!教您使用工业树莓派结合CODESYS配置EtherCAT主站
Insight into the general trend of the Internet, after reading this article, you will have a thorough understanding of Chinese domain names









