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++

  1. 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.
  2. Create a data file that consists of five records based on the information above.
  3. 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.
  4. Create a function called DisplayOne that is passed one element of the array by value and is then displayed to the screen.
  5. 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.
  6. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!