| 
                  Operator Overloading in C++
                   An Introduction  | 
            
| 
                   
                      
                     Prof. David Bernstein
                       | 
            
| Computer Science Department | 
| bernstdh@jmu.edu | 
               
            
         
            
         Weight class
         
            
         + and
              = operators
         
            
         
         
            
         operator keywordWeight operator +(Weight a, Weight b);
                     
         
            
         const
              (the += operator is an exception)Weight operator +(const Weight &a, const Weight &b);
                     
         
            
         
         
            
         
         
            
         operator keywordWeight operator +(const Weight &a) const;
                     
         
            
         
         
            
         
         
            
         
         
            
         void) since it is
               a "setter"w = u = v;?