Question: Write a program that has the following functionality using c++ Define a structure that has a string for a persons first name, an integer for
Write a program that has the following functionality using c++
- Define a structure that has a string for a persons first name, an integer for a persons age, and a character for a persons gender.
- Create a data file that consists of five records based on the information above.
- Create an array of structures and pass that array to a function called ReadData where the array will be filled by reading from the data file.
- Create a function called DisplayOne that is passed one element of the array by value and is then displayed to the screen.
- Create a function called EditRef that is passed an element of the array by reference. The function will then allow the user to edit the information in the structure.
- Create another function called EditPointer that has the same functionality as EditRef except that the structure is passed by pointer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
