Skip to main content

1998 | OriginalPaper | Buchkapitel

Date Class

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

Erschienen in: Mastering C++ Programming

Verlag: Macmillan Education UK

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

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

Metadaten
Titel
Date Class
verfasst von
W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Copyright-Jahr
1998
Verlag
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-14795-3_10