const (need to be cleaned up)
1.const as "const variable"
 2.function parameters
 together with "&"
 int add(int &a);//can be modified
 int add(const int &a);//can't be modified 
 //but more efficient than int add(int a); no value copy
 3.override function
 int add();
 int add() const;
 //different function;
 4.return value
 class A;
 const A add();
 the return value of add(), can't use as left value.
 5.const member of class
 must be initialized in the constructor function list.
 only const function can visit const member.?
 6.const member function
 class{
 int a;
 void adda()const{a++;}//cant modify
 }
 const function cant modify member of the class.
 7.const object
 nothing in the object can be modified.
 it can only call const function
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号