У меня есть класс, который дает значение за соответствующее время. У меня есть метод, который изменяет m_time
(в чч, мм, сс) [мс] , но в конце объявляется как const
. Поэтому мне нужно изменить атрибут m_time
, но я не могу! как я мог go обойти это?
Вот мой код:
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& hh , unsigned int& mm , double& ss ) const;
bool operator <(const CMeasurementValue& rop)const ;
friend ostream& operator <<( ostream& out, const CMeasurementValue& rop);
void print();
};
void CMeasurementValue::calculateTime(unsigned int& hh , unsigned int& mm , double& ss) const
{
// ??
}