mercredi 20 juillet 2016

How to use for area loop within templates in c++

I have problems to loop trough a vector that contains items of template classes.

The code is the following:

for (auto t : *tList){
   qDebug() << t.name();
   rowList.append(t);
}

The problem is that the loop is not exited. So i have infinite loop at this point. Before i changed my code to use templates the loop worked very well. So i think there is something missing here.

Aucun commentaire:

Enregistrer un commentaire