i have 2 "errors term does not evaluate to a function tacking 2 arguments" in line 64
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());
}
Re: i have 2 "errors term does not evaluate to a function tacking 2 arguments" in lin
1. Please use COODE tags while posting code snippets.
2. Where is your "line 64"?
Re: i have 2 "errors term does not evaluate to a function tacking 2 arguments" in lin
Code:
auto count = unique(books.begin(), books.end(),books.size());
If this is using std::unique()? If yes, then its 3rd param is wrong. Either don't have one or it needs to be binary predicate.
See auto count = unique(books.begin(), books.end(),books.size());
If this is not std::unique(), what's the implementation/declaration?