Please send questions to
st10@humboldt.edu .
* another C++ class tidbit:
this - a keyword that, within a method,
is a pointer to the calling object
* you'll see this in string_list in the
overloaded assignment operator
STL - standard template library
* a collection of C++ container classes
* walked through the implementation of dynamic-array-based
class string_list in string_list.cpp
* ...this class is tested in string_list_test.cpp
* talked about the linked-list-implementation of
the same kind of list of strings, in
string_list2.h and string_list2.cpp, tested in
string_list2_test.cpp
* string_list2 uses a class string_node, a little
class with two data fields:
* a value field containing a string, and
* a next field containing a pointer to
the next string_node in a linked list;
* the last node has a next field whose value
is NULL (to indicate it isn't pointing
to a next node...)
* note that string_list and string_list2 look
THE SAME to the *user* -- the same methods --
only the name (string_list, string_list2)
differs;
* one demonstration of this: string_list_test.cpp
and string_list2_test.cpp differ only
in the name of the class!
* and another -- string_list.h and string_list2.h
differ only in their private data fields!
* how those methods are implemented in string_list.cpp
and string_list2.cpp are quite different, of
course -- one using an underlying dynamically-allocated
array, and the other using a pointer to the first
of a linked "chain" of string_nodes;