I have a Registration class that includes a QDate member. How do I initialize it to the current date?
#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) {}
According to http://doc.qt.io/qt-5/qdatetime.html, you can use
QDateTime::currentDateTime()to get the date.