0

Hello to every body

I hope every one keep in best state.

I want to help me in solve this problem in my Sheet .

I use recurrence functions in like list.( with ADT file ) by modify the search function and adding Printing function in a Reverse Manner.

the problems is :

error LNK2005.

and fatal error LNK1169.

I searched about it .

but I think the error mode by the pointer

and warning is :

MyClass <DataType,int>:: search' : not all control paths return a value

(appear after search function )

the code :

search function

```
template <class TYPE, class KTYPE>
bool List<TYPE, KTYPE> :: _search (NODE<TYPE> * node,
NODE<TYPE> **pPre,
NODE<TYPE> **pLoc,
KTYPE key)
{
// Statements
if ( node-> link )
return false;
node = node->link;
if ( (node->data).key == key)
{
*pPre = node;
*pLoc = node-> link ;
return true ;
}
else
_search (node->link, pPre, pLoc, key);
}
```

and

print Function

```
template<class TYPE, class KTYPE>
void List <TYPE, KTYPE > :: ReversePrint ( NODE <TYPE> * node )
{
if ( node== NULL)
return ;
ReversePrint (node->link);
//cout <<( node->link)->data;
cout << node-> data;
return ;
}
ostream & operator << (ostream & out , Student & Data)
{
out << "The name is : " << Data.name << "\nThe Level is : " << Data.level<< "\nThe ID is :"<<Data.key;
return out;
}
```

if you want to see any another function , tell me...

must be sent the program at most after 9 houer.

I hooooooooope help me

please;