错误
QVector<LibraryRecord> Library;
Library.push_back(LibraryRecord(DateOfIssue, ReturnDate, FIO,tTekct,FName,TText));
Run Code Online (Sandbox Code Playgroud)
错误信息:
no matching function for call to ‘LibraryRecord::LibraryRecord()’
Run Code Online (Sandbox Code Playgroud)
为什么?构造函数存在
//constructor
LibraryRecord::LibraryRecord(QString pDateOfIssue,
QString pReturnDate,
QString FIO,
QString tTekct,
QString fName,
QString TTextt)
{..}
Run Code Online (Sandbox Code Playgroud)
你能告诉我怎么解决这个问题吗?提前致谢!
QVector<cLibraryRecord> Library;
...
Library.push_back(cLibraryRecord(ReaderFullName, BookGenre, BookTitle, AuthorsFullName, IssueDate, ReturnDate));
...
Library.remove(i);
Run Code Online (Sandbox Code Playgroud)
QVector::remove() 不会清除内存。如何清理内存?提前致谢。