2
我有一个Registration
类,其中包括QDate
成员。我如何将它初始化为当前日期?如何将QDate设置为当前日期?
#include <QDate>
class Registration {
private:
Person m_Attendee;
QDate m_BookingDate; // how do I initialze this?
public:
Registration(Person a);
};
Registration::Registration(Person a): m_Attendee(a) {}
所以在registration.cpp我应该把常量QDate注册:: BookingDate = currentDateTime(); – 2012-02-22 08:46:11
'登记注册::(一人):m_Attendee(一),m_BookingDate(QDATE ::的currentdate()){}' – Alexander 2012-02-22 09:01:25
感谢ü非常 – 2012-02-22 09:12:51