c++ Design and define a Person structure from the previous lab. Part I: Declare an array of 3 persons. Allow the user to populate the
c++
Design and define a Person structure from the previous lab. Part I: Declare an array of 3 persons. Allow the user to populate the array. Write a function that ensures that the names are capitalized. The prototype should look like: void capitalize(Person &arg); Q: Explain why we need the address-of operator ( & ). Answer in a comment within the function. Part II: Write a function that nicely outputs the data encapsulated within the Person objects. void printPerson(Person arg); Q: Explain why we do not need the address-of operator ( & ). Answer in a comment within the function. Within the main function choose an appropriate repetition structure to loop the 3 function calls that will print out the data. ---
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started