title: How to change a class member in a method declared as const
body: <p>I have a class which gives value for a corresponding time. I have a method that changes the <code>m_time</code> <strong>(in hh,mm,ss)[ms]</strong> but is declared as <code>const</code> at the end. So I need to change the attribute <code>m_time</code> but I can't ! how could I possibly go around this?</p>
  
  <p>Here is my code:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class CMeasurementValue
  {
  private:
      double m_value;
      unsigned int m_time;
  
  public:
      CMeasurementValue(double value=0,unsigned int time=0);
      CMeasurementValue(double value,unsigned int hh,unsigned int mm , double ss);
      double getValue() const ;
      unsigned int getTime() const;
      void calculateTime(unsigned int&amp; hh , unsigned int&amp; mm , double&amp; ss ) const;
      bool operator &lt;(const CMeasurementValue&amp; rop)const ;
      friend ostream&amp; operator &lt;&lt;( ostream&amp; out, const CMeasurementValue&amp; rop);
      void print();
  };
  
  void CMeasurementValue::calculateTime(unsigned int&amp; hh , unsigned int&amp; mm , double&amp; ss) const
  {
      // ??
  }
  </code></pre>