As we’ve seen, a pointer is an object that can point to a different object. As a result,
we can talk independently about whether a pointer is const and whether the objects
to which it can point are const. We use the term top-level const to indicate that the
pointer itself is a const. When a pointer can point to a const object, we refer to
that const as a low-level const.
 
这是英文的介绍,我感觉清晰明了比那些遮遮掩掩的中文好多了。

顶层const和底层const的更多相关文章

  1. C++中顶层const和底层const

    1. 顶层 const 与底层 const 概念 指针本身是一个对象,由于,指针实际相应着内存单元的一段存储空间,然而,指针所指向的也是一个数据对象,因此,指针是一个常量与指针所指向的是一个常量是两个 ...

  2. c++ 顶层const与底层const

    底层const是代表对象本身是一个常量(不可改变):      顶层const是代表指针的值是一个常量,而指针的值(即对象的地址)的内容可以改变(指向的不可改变): #include <iost ...

  3. c++ primer 中讲的顶层const 和 底层 const 理解

    c++ primer 中讲的    顶层const 和 底层 const   以前没搞懂的顶层const和底层const,这次看了后感觉明白了. 首先,const是一个限定符,被它修饰的变量的值不能改 ...

  4. C++之const限定符(顶层const,底层const)

    作者:tongqingliu 转载请注明出处:http://www.cnblogs.com/liutongqing/p/7050815.html C++之const限定符(顶层const,底层cons ...

  5. this指针、引用、顶层和底层const关系

    1.首先顶层const和底层const是围绕指针*p的说法.底层:const int *p,const不是修饰指针p,指针所指的值不能改变:顶层:int *const p,const修饰指针p,指针本 ...

  6. 看 C++ Primer 的58页, 讲拷贝时不能忽略 底层const这里的说的原因有点牵强, 这里给出自己的理解

    extern const  int ci =42; const int * p2  = &ci; extern const  int *const p3= p2; int *p= p3;   ...

  7. static、const和static const

    http://blog.csdn.net/rainkin1993/article/details/8068558 #include<iostream> using namespace st ...

  8. 【转】深入理解const char*p,char const*p,char *const p,const char **p,char const**p,char *const*p,char**const p

    一.可能的组合: (1)const char*p (2)char const*p (3)char *const p(4)const char **p (5)char const**p (6)char ...

  9. 【c++基础】const、const指针、const引用

    一.const常量 声明时必须同时初始化(和“引用”一样) 二.const指针 三.const引用 引用本身和引用的对象都是const对象,可以用字面值来赋给const引用(普通引用则不行) ; co ...

随机推荐

  1. kindeditor使用方法

    一.下载编辑器 下载KindEditor最新版本(本版本为4.1.10) 下载页面:http://kindeditor.net/down.php 二.部署编辑器 解压kindeditor-x.x.x. ...

  2. springMVC3学习(十二)--文件上传优化CommonsMultipartResolver

    基于上一篇文件上传发现效率很慢,我们应该对它进行优化  使用springMVC对文件上传的解析器 来处理文件上传的时候需要在spring的applicationContext里面加上springMVC ...

  3. 论公司spring的滥用

    这个公司每个项目用不同的一套开发框架,实在忍不住拿一个出来说说事.

  4. MVC3.0+knockout.js+Ajax 实现简单的增删改查

    MVC3.0+knockout.js+Ajax 实现简单的增删改查 自从到北京入职以来就再也没有接触MVC,很多都已经淡忘了,最近一直在看knockout.js 和webAPI,本来打算采用MVC+k ...

  5. 2013 Esri全球用户大会之元数据支持

    1.1 是否支持FGDC CSDGMArcGIS是否支持FGDC CSDGM和North American Profile (NAP)元数据标准?如何支持? 支持,从ArcGIS forDesktop ...

  6. [置顶] 遵循Java EE标准体系的开源GIS服务平台架构

    传送门 ☞ 系统架构设计 ☞ 转载请注明 ☞ http://blog.csdn.net/leverage_1229 传送门 ☞ GoF23种设计模式 ☞ 转载请注明 ☞ http://blog.csd ...

  7. C语言之自增和自减运算符

    一 自增和自减 自增(++):就是给自己的值再加1 自减(--):就是给自己的值减1 tips: ++(--)可以放在前面,也可以放在后面,效果都是一样,都是会给自身+1(-1) 前缀++(--):会 ...

  8. 算法笔记_014:合并排序(Java)

    1 问题描述 给定一组数据,使用合并排序得到这组数据的非降序排列. 2 解决方案 2.1 合并排序原理简介 引用自百度百科: 合并排序是建立在归并操作上的一种有效的排序算法.该算法是采用分治法(Div ...

  9. hdu1046

    #include<iostream> #include<cmath> using namespace std; int main() { int T,t=0,m,n; cin& ...

  10. Android Studio报错 Error: A library uses the same package as this project

    今天在导入一个项目的时候,as报错 Error: A library uses the same package as this project 经过百度Google 发现解决办法:在modules的 ...