I need a way for this recursive to end when the item is not in the list. Can you help? Thanks!!
Code:template <typename T> class List { private: T * array;//memory for array will be dynamic int insert(T * array, T item, int size); void List::insert (int index, ListItemType newItem, bool& success) { success = bool( (index >= 1) && (index <= size +1) && (size < MAX_LIST) ); if (success) { items[translate(index)]=newitem; ++size; insert(index+1,newitem,success); } }