Programming and Graphics

(Kiana) #1

148 Introduction to C++ Programming and Graphics


return 0;
}

The output is:


0x917e008
0x917e008

To free memory, we can delete the pointer using the commands:


delete []pv;
pv=0;

The pointer-to-array conversion, and vice versa, is as brilliant as it is baffling.


Problem


5.6.1.What would the output of thepointerfree1.cccode be without the line
delete memad;?

Free download pdf