Need way to end
I need a way for this recursive to end when the item is not in the list. Can you help? Thanks!!
template <typename T>
T * array;//memory for array will be dynamic
int insert(T * array, T item, int size);
void List::insert (int index, ListItemType newItem,
success = bool( (index >= 1) &&
(index <= size +1) &&
(size < MAX_LIST) );
The insert function does not match in the interface and implementation.
One solution is to do the check before the if statement.
Ok, not sure how to do that. Would it be another if statement?
How about, search the array and if the value is found return the location of the value, that is the value in position 1 or 6 or ?. How do I do that?