指针常量和常量指针
来源:互联网 发布:nob2b 邮件群发软件 编辑:程序博客网 时间:2024/06/07 06:37
这一概念经常混淆,故写下来,以备不时之需
int a=10;int * const b=&a;//const修饰b,b本身不可变,但是*b可变;人称常量指针,即指针是常量,地址不可改变*b=20;//更换值cout<<*b<<endl;int const * bb=&a;//const修饰*bb,*bb不可变,但是bb可变;人称指针常量,指向常量的指针,值不可以变,地址可以改变int c=30;bb=&c;//更换指向cout<<*bb<<endl;
- 常量指针和指针常量
- 指针常量和常量指针
- 常量指针 和 指针常量
- 常量指针 和 指针常量
- 常量指针 和 指针常量
- 指针常量和常量指针
- 常量指针和指针常量
- 常量指针和指针常量
- 常量指针和指针常量
- 指针常量和常量指针
- 常量指针 和 指针常量
- 常量指针和指针常量
- 指针常量和常量指针
- 常量指针和指针常量
- 常量指针和指针常量
- 指针常量和常量指针
- 常量指针和指针常量
- 常量指针和指针常量
- Which of the following statements describe the result when standard new CANNOT allocate the requeste
- Documentation/fb/pvr2fb
- php中使用函数
- android 在myeclipse中查看源码
- A child container failed during start
- 指针常量和常量指针
- 代码生成-php代码生成-专注代码生成30年.
- bzoj 2741 分块 + 可持久化trie
- 图像有用区域(广搜)
- javascript 闭包浅析
- SSH通信配置-更新
- main.html 梳理2_git使用1
- Comparison Between NetCDF and HDF5
- 使用c99编译出warning: implicit declaration of function ‘popen’