Question: Modify and augment your (mathrm{C}++) program from Chapter 3, Indirect Addressing - Pointers, Question 1 as follows: 1. Overload your Read Data () function with
Modify and augment your \(\mathrm{C}++\) program from Chapter 3, Indirect Addressing - Pointers, Question 1 as follows:
1. Overload your Read Data () function with a version that accepts a student & parameter to allow first Name, last Name, current Course Enrolled, and gpa to be entered from the keyboard within the function.
2. Replace the Print () function that takes a student from your previous solution to instead take a const Student \(\&\) as a parameter for Print().
3. Create variables of type student and of type student * in main(). Now, call the various versions of Read Data (), and Print (). Do the pointer variables necessarily need to call the versions of these functions that accept pointers, and do the nonpointer variables necessarily need to call the versions of these functions that accept references? Why or why not?
Data From C++
This chapter will provide a thorough understanding of how to utilize pointers in C++. Though it is assumed that you have some prior experience with indirect addressing, we will start at the beginning. Pointers are a ground-level and pervasive feature of the language - one you must thoroughly understand and be able to utilize with ease. Many other languages use indirect addressing through references alone; however, in C++ you must roll up your sleeves and understand how to use and return heap memory correctly and effectively with pointers. You will see pointers heavily used throughout code from other programmers; there is no sensible way to ignore their use. Misusing pointers can create the most difficult errors to find in a program. A thorough understanding of indirect addressing using pointers is a necessity in C++ to create successful and maintainable code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
