1998 | OriginalPaper | Chapter
Date Class
Author : W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Published in: Mastering C++ Programming
Publisher: Macmillan Education UK
Included in: Professional Book Archive
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
This chapter deals with a common use of classes — as containers for other classes. We begin by looking at a simple list class and develop this so that it can be used with any collection of objects. This leads on to the concept of template classes which, in later implementations of C++, enable structures such as generic lists or generic bounded arrays to be constructed. Another use of templates is as generic functions and in Section 9.7 we look at a simple template function example. Finally we touch very briefly on the idea of exception handling in C++.