Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions