Homework/HW02/List.cc
ListIterator List::locate(int number)
{
    ListIterator locator = begin(); // start form the head
    while (locator && *locator != number) // while we haven't reached the end
                                          // nor found the target
        ++locator; // move to the next node
    return locator; // return the iterator containing the target
                    // or containing NULL if it wasn't there
}
// Finds the given number in the list and return a list iterator
// containing a pointer to the node containing the number in
// question. If the number is not in the list, it returns an iterator   
// where the pointer current is NULL.
Finds the given number in the list and return a list iterator
containing a pointer to the node containing the number in
question. If the number is not in the list, it returns an iterator
where the pointer current is NULL.
Finds the given number in the list and return a list iterator containing a pointer to the node containing the number in question . If the number is not in the list it returns an iterator where the pointer current is NULL .
ListIterator List::locate(int number)
{
    ListIterator locator = begin(); 
    while (locator && *locator != number) 
        ++locator; 
    return locator; 
}
ListIterator List :: locate ( int number ) { ListIterator locator = begin ( ) ; while ( locator && * locator != number ) ++ locator ; return locator ; }
Finds the given number in the list and return a list iterator
containing a pointer to the node containing the number in
question.
Finds the given number in the list and return a list iterator containing a pointer to the node containing the number in question .
// start form the head // while we haven't reached the end // nor found the target // move to the next node // return the iterator containing the target // or containing NULL if it wasn't there