Question: void Library::sortBooks ( ) const { std::sort ( books . begin ( ) , books.end ( ) , [ ] ( const Book& pr ,

void Library::sortBooks() const
{
std::sort(books.begin(), books.end(),
[](const Book& pr, const Book& rpr)
{return pr.getBookTitle()< rpr.getBookTitle(); });
}
returns two errors, c2664 with the description 'bool Library::sortBooks::::operator()(const Book&, const Book&) const': cannot convert argument 1 from 'char' to 'const Book&' in the file xutility line 1372 twice, and the same error in the file algorithm, lines 7984,7988,7999,8013, The algorithm file is only used to sort the books, and the xutility file isnt used at all in my project so i dont understand why it is giving me errors. any help is appreciated.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!