Hi,
What is wrong with the following code?
#include <QLinkedList>
#include <QListIterator>
int main(int argc, char *argv[])
{
QLinkedList<QString> listProjName;
QListIterator<QString> iLPN(listProjName);
QLinkedList<int> listProjID;
QListIterator<int> iLPID(listProjID);
...
}
#include <QLinkedList>
#include <QListIterator>
int main(int argc, char *argv[])
{
QLinkedList<QString> listProjName;
QListIterator<QString> iLPN(listProjName);
QLinkedList<int> listProjID;
QListIterator<int> iLPID(listProjID);
...
}
To copy to clipboard, switch view to plain text mode
main.cpp: In function `int qMain(int, char**)':
main.cpp:29: error: no matching function for call to `QListIterator<QString>::QL
istIterator(QList<QString>*)'
C:/Qt/4.2.2/include/QtCore/../../src/corelib/tools/qlist.h:644: note: candidates
are: QListIterator<QString>::QListIterator(const QListIterator<QString>&)
C:/Qt/4.2.2/include/QtCore/../../src/corelib/tools/qlist.h:644: note:
QListIterator<T>::QListIterator(const QList<T>&) [with T = QString]
...
Bookmarks