PIXADMIN
asked on
C++ Recursive Search
Greetings experts,
I am currently helping my nephew with a C++ class, though my C++ is marginal at best, and I must admint I'm a bit stumped on a question he has for an assingment. The question is to write a recursive sequential search function for a linked list and an array. The thing that is troubling me is that the functions prototype is to only pass to values, an int for the value to search for and a bool item to mark the search as true/false. So the prototype looks like..
void ItemType::Look(int val, bool& gotit)
I'm stumped to code this recursively..
P.S. I plan to help him not give the answer to him.. HA HA
Thanks!!
I am currently helping my nephew with a C++ class, though my C++ is marginal at best, and I must admint I'm a bit stumped on a question he has for an assingment. The question is to write a recursive sequential search function for a linked list and an array. The thing that is troubling me is that the functions prototype is to only pass to values, an int for the value to search for and a bool item to mark the search as true/false. So the prototype looks like..
void ItemType::Look(int val, bool& gotit)
I'm stumped to code this recursively..
P.S. I plan to help him not give the answer to him.. HA HA
Thanks!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If the author does not object, my answer should be considered as a solution.