cout << "Enter the book title whcih is to be found: ";
cin >> targetTitle;
for (int i = 0; i < booklist.size(); i++)
{
if (targetTitle.compare(booklist[i].setTitle))
break;
if (i == booklist.size())
cout << "book with the title " << targetTitle << "is not found" << endl;
else
cout << "Book with the title " << targetTitle << "is found" << endl;
cout << endl;
}
int targetIsbn;
cout << "Enter the book isbn number which is to be found: ";
cin >> targetIsbn;
for (int i = 0; i < booklist.size(); i++)
{
if (targetIsbn.compare(booklist[i].isbn))
break;
if (i == booklist.size())
cout << "Book with the isbn number" << targetIsbn << "is not found" << endl;
else
cout << "Book with the isbn number" << targetIsbn << "is found" << endl;
cout << endl;
}
int copiesInStock = 10;
b1.update_numberOfCopies(copiesInStock);
cout << endl;
cout << "the number of copies for the book " << b1.setTitle << " has ben updated: ";
cout << b1.return_numberOfCopies();
b1.update_publisher("PQR");
cout << endl;
cout << "The publisher of the book" << b1.setTitle << "has been updated: ";
cout << b1.return_isbn();
b1.update_price(150.75);
cout << endl;
cout << "The price of the book" << b1.setTitle << "has been updated: ";
cout << b1.return_price();
vector<string> authorsName2;
authorsName2 = { "MNO","STU" };
b1.update_authors(authorsName2);
cout << endl;
cout << "The authors of the book" << b1.setTitle << "have been updated: " << endl;
authorsName2 = b1.return_authors();
for (int i = 0; i < booklist.size(); i++)
{
cout << authorsName2[i] << endl;
}
system("pause");
return 0;