Skip to main content
Top

1998 | OriginalPaper | Chapter

Date Class

Author : W. Arthur Chapman, BSc (Hons), BA (Hons), PhD

Published in: Mastering C++ Programming

Publisher: Macmillan Education UK

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

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++.

Metadata
Title
Date Class
Author
W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Copyright Year
1998
Publisher
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-14795-3_10

Premium Partner