since this is an ordered list and it is searching where to place the new item in the list so it is in order, do i need another while loop to check for the duplicates, i know you need to go through the whole list and compare each item by moving another pointer along, i'm just not sure where in the insertNode where to code it. it uses the linkedlist.h file which i'll sent as well. I appreciate your help, thanks one again.
using namespace std;
class orderedLinkedListType: public linkedListType<Type>
bool search(const Type& searchItem);
//Function to determine whether searchItem is in the list.
//Postcondition: Returns true if searchItem is found in
// the list; otherwise, it returns false
void insertNode(const Type& newItem);
//Function to insert newItem in the list.
//Postcondition: first points to the new list and newItem is
// inserted at the proper place in the list.
void deleteNode(const Type& deleteItem);
//Function to delete deleteItem from the list.
//Postcondition: If found, the node containing deleteItem
// is deleted from the list; first points
// to the first node of the new list.
// If deleteItem is not in the list, an
// appropriate message is printed.
bool orderedLinkedListType<Type>::search(const Type& searchItem)
nodeType<Type> *current; //pointer to traverse the list
found = false; //initialize found to false current = first; //start the search at the first node while(current != NULL && !found) ...