Const member function definition
| 11 | |
| 12 | // Const member function definition |
| 13 | double Box::volume() const |
| 14 | { |
| 15 | return m_length * m_width * m_height; |
| 16 | } |
| 17 | |
| 18 | // Modify mutable member variable from a const member function |
| 19 | void Box::printVolume() const |