The semantics of the C++ programming language

Charles Wallace · 1995

data types such as stacks and queues can be represented as container classes. For example, the notion of a list defines the way in which list items, or nodes, are linked to one another and methods of manipulating the items but leaves undefined the type of information stored in a node. A family of list types can be defined simply by specifying different values for this type information. A template separates the structure common to all members of the family from the type information specifying a particular member of the family. A list of type arguments is supplied first, followed by a declaration; the specific type information is supplied as arguments, while the common structure is defined in the declaration. A common example of a container class is the singly-linked list. This abstract data type consists of two data items and a set of manipulation functions. The data items are the information contained in a node of the list and a pointer to the next node in the list, and typical manipul...

Read the paper · More papers on PaperTik