摘要: const_cast转换符是用来移除变量的const或volatile限定符。 对于const变量,我们不能修改它的值,这是这个限定符最直接的表现。但是我们就是想违背它的限定希望修改其内容怎么办呢? 下边的代码显然是达不到目的的: const int constant = 10; int modif 阅读全文
posted @ 2017-10-10 11:14 阿玛尼迪迪 阅读(399) 评论(0) 推荐(0)