摘要:        
扩展 将拷贝构造函数声明为explicit,则会阻止隐式拷贝构造函数的调用.隐式拷贝构造函数的调用主要发生在三个点: 1.一个对象作为函数参数,以值传递的方式传入函数体. 2.一个对象作为函数返回值,以值传递的方式从函数返回. 3.以AAA = xxx的方式创建对象AAA,xxx为与AAA为同类型的    阅读全文
posted @ 2016-04-15 19:29
aitao
阅读(955)
评论(0)
推荐(0)
        
            
        
        
摘要:        
#include <stdio.h> int main(){ const int constant = 21; const int* const_p = &constant; int* modifier = (int*)(const_p); *modifier=10; printf("%d \n",    阅读全文
posted @ 2016-04-15 16:17
aitao
阅读(329)
评论(0)
推荐(0)
        
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号