I am trying to utilize a nested QList:
QMap<int, QMap<QString, QList<int> > > teamGames;
for (int team1 = 1; team1 <= TOTAL_TEAMS; ++team1) {
QMap<QString,QList<int>> games;
teamGames[team1]=games;
QList<int> home;
QList<int> away;
games["home"] = home;
games["away"] = away;
}
teamGames.value(1).value("home").push_back(1);
When I compile I get: 1>.\main.cpp(154) : error C2662: 'QList::push_back' : cannot convert 'this' pointer from 'const QList' to 'QList &'
I'm sure its something simple that I'm overlooking, or maybe there is a simpler solution that's eluding me. Any help greatly appreciated.