Q&A

Q1:Why are pointers so important?
A1: During this hour you saw how pointers are used to hold the address of objects on the heap and how they are used to pass arguments by reference. In addition, in Hour 13, “Advanced Functions,” you'll see how pointers are used in class polymorphism.
Q2:Why should I bother to declare anything on the heap?
A2: Objects on the heap persist after the return of a function. Additionally, the capability to store objects on the heap enables you to decide at runtime how many objects you need, instead of having to declare this in advance. This is explored in greater depth in Hour 10.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.60.63