1998 | OriginalPaper | Buchkapitel
Date Class
verfasst von : W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Erschienen in: Mastering C++ Programming
Verlag: Macmillan Education UK
Enthalten in: Professional Book Archive
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. 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++.