摘要:                    
You are given have a datatype, say X in C. Determine the size of the datatype,without declaring a variable or a pointer variable of that type, and, of course without usingthe sizeof operator!                阅读全文
            
        随笔分类 - C++
assignment operator:对class中const成员变量赋值
2010-09-26 19:19 by wansishuang, 282 阅读, 收藏,
摘要:                    
#include using namespace std; class Test { public: Test(int _a):a(_a) { } Test& operator=(const Test& ra) { if(&ra != this) { const_cast(a) = ra.a; ...                阅读全文
            
         
                    
                     
                    
                 
                    
                 浙公网安备 33010602011771号
浙公网安备 33010602011771号