You have built yourself a memory management nightmare there. How about:
int numberofFlights = 5;
int numberofSeats = 20;
QVector<QVector<QString> > flightMatrix;
flightMatrix.resize(numberofFlights);
foreach(QVector<QString> flight, flightMatrix)
flight.resize(numberofSeats);
int numberofFlights = 5;
int numberofSeats = 20;
QVector<QVector<QString> > flightMatrix;
flightMatrix.resize(numberofFlights);
foreach(QVector<QString> flight, flightMatrix)
flight.resize(numberofSeats);
To copy to clipboard, switch view to plain text mode
Bookmarks