its about Data Structure
(in doubly link List )
this is my function
bool search( T item)
{
nodetype <T> *cur;
bool found;
cur=first;
while(cur!=NULL && !found)
{
if((cur->info).name==item)
return true;
else
cur=cur->next;
}
return found;
}
and this is the error :
error C2664: 'search' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'struct Book'
No constructor could take the source type, or constructor overload resolution was ambiguous
this the call from main :
case 3:
cout<<"Please Enter person's name to search :";
cin>>name2;
cout<<"\n";
found=L1.search(name2);
if(found==false)
cout<<"Not found\n";
else
L1.display(name2);
break;