home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 715.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  602KB  |  2550x3300
Labels: book | daybook | reckoner | sky
OCR: 12.4 C++ and OOP Polymorphism 715 Note template< class T int n Note Array<T n> :Array for int 0i n i++ lts[i] Note Array<T template< n> class :Array T, int. Array<T, n>& Notes const for int n, elts[i] Note bool templ late< Array<T class n> T int Array<T n>& A const // Notes Note 1 & bool match true; for nt n, i++ elts[i] match fal return match, Note 2 Note temp late< class T, int n Note T& Array<T, n> ope ra torll int index index Index 11 index of ange n Note Note cerr out exit return elts[ index 1 are This file contains the implementation ofa class template for an must be Array replaced There two template arguments. The first 18 C. ass T: this argument instantiated This argument with type when objects of this class template are 19 allows us to declare Array objects of any type T The secon ...