-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hy,
I try to use your DTime class (it's very usefull), but it's not possible to do that :
DTime dateActuel = dateRef;
So, i propose to add a copy constructor and an overload for operator= like this :
in DTime.h :
DTime(const DTime & z);
DTime& operator=(const DTime & z);
in DTime.cpp :
DTime::DTime(const DTime & z) {
_year = z.year;
_month = z.month;
_day = z.day;
_hour = z.hour;
_minute = z.minute;
_second = z.second;
_timestamp = z.timestamp;
_weekday = z.weekday;
}
DTime & DTime::operator=(const DTime & z) {
_year = z.year;
_month = z.month;
_day = z.day;
_hour = z.hour;
_minute = z.minute;
_second = z.second;
_timestamp = z.timestamp;
_weekday = z.weekday;
return *this;
}
If you are agree, can you add the functions and create a new revision of the DTime class ?
Thanks a lot
-> Say me if you prefer me to do that
Metadata
Metadata
Assignees
Labels
No labels