Code:#include "Bibleoteca.h" #include<list> #include<vector> #include<algorithm> #include<iostream> using namespace std; void Bibleoteca::Adauga(Carte book) { books.push_back(book); cout << endl; } void Bibleoteca::Afis() { for (auto& elem : books) { elem.Print(); } } void Bibleoteca::cauta_Titlu(string title) { for (auto &elem : books) { if (elem.titlu == title) { elem.Print(); } } } //void Bibleoteca::caut_Editura(string editura) //{ // auto reult = find(begin(books), end(books), editura); // if (reult != end(books)) // { // this->Afis(); // } // else // { // cout << "librarie nu contine" << endl; // } //} Carte * Bibleoteca::caut_ISBN(string ISBN) { for (auto &elem : books) { if (elem.ISBN == ISBN) { return &elem; } } return nullptr; } void Bibleoteca::unic_ISBN(string ISBN) { auto count = unique(books.begin(), books.end(),books.size()); }




Reply With Quote
