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 / 683.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  551KB  |  2550x3300
Labels: book | crt screen | poster | reckoner
OCR: 12.2 Some Added Features 683 SYNTAX for new of 'that type new new new type t.ype type value elts Allocates Initializes Allocates the space space space for for n an with elts element of value. that type The operator new returns pointer 10 address the reason. allocated space (or NULL if the memory cannot be allocated for some unc- Consider the following declarations: bles nt rray ref The following examples indicate the three different ways to allocate memory ptr new int new int array new int The operand operator that does memory de-allocation returned is by cel new. lete. It is a unary operand The must be an address that was the SYNTAX ete for delete location allocated de pointer De- -allocates memory by new delete[] de-allocates an array allocated by MOU ses As an example the statement del ...