mercredi 22 juillet 2020

Can't initialiaze m_days[month][day]= an object

class App
{
public:
    App();
    void someFunction();
private:
    QList<QList<Date *> > m_days;
};

void App::someFunction() {
   a = new Date;
   qDebug() << "A";
   m_days[0][0]= a;  // [month][day]
   qDebug() << "B";

Output is:

A

It crashes right away. It crashes on the line of qDebug "A".I cannot find what is wrong with the code. Any help would be nice!

Aucun commentaire:

Enregistrer un commentaire