Abstract
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++.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Copyright information
© 1998 W. Arthur Chapman
About this chapter
Cite this chapter
Chapman, W.A. (1998). Date Class. In: Mastering C++ Programming. Macmillan Master Series. Palgrave, London. https://doi.org/10.1007/978-1-349-14795-3_10
Download citation
DOI: https://doi.org/10.1007/978-1-349-14795-3_10
Publisher Name: Palgrave, London
Print ISBN: 978-0-333-73179-6
Online ISBN: 978-1-349-14795-3
eBook Packages: EngineeringEngineering (R0)