Zander87
3rd April 2010, 11:51
Hello everybody, i am encoutering a problem using the append/push_back funtcion of Qvector:
Doing this with the std works:
testclass test(&j); // just to try the declaration of one object
vector<testclass> table(1,testclass(&j));
table.push_back(&j);
Now doing this with Qt doesn't work:
QVector<testclass> table(1,testclass(&j));
table.push_back(&j);
Code blocks said :
error: no matching function for call to `testclass::testclass()' (error on line 2)
But i don't understand were the programm does such a call ( with no argument to the constructor )
If anybody can help me.. this would be great....
thks
Doing this with the std works:
testclass test(&j); // just to try the declaration of one object
vector<testclass> table(1,testclass(&j));
table.push_back(&j);
Now doing this with Qt doesn't work:
QVector<testclass> table(1,testclass(&j));
table.push_back(&j);
Code blocks said :
error: no matching function for call to `testclass::testclass()' (error on line 2)
But i don't understand were the programm does such a call ( with no argument to the constructor )
If anybody can help me.. this would be great....
thks