Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool LList :: search(short x , Node* p)const{
- if(p == nullptr){
- return false;
- }
- if(p -> item == x){
- return true;
- }
- search(x,p->next); // program crashes if return is used here
- }
- bool LList :: search(short x) const{
- return search(x,head);
- }
Add Comment
Please, Sign In to add comment