Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ Please. Thank you! (10 points) Consider the following records stored in data.txt text file and declarations. data.txt text file. Each record consists of
In C++ Please. Thank you! (10 points) Consider the following records stored in "data.txt" text file and declarations. "data.txt text file. Each record consists of declarations president's name, president's years served, struct person and wife's name { string presName; Joe_Biden 2021-present Jill string yearsServed Jimmy_Carter 1977-1981 Rosalynn string wifeName; Ronald_Reagon 1981-1989 Nancy George Bush 1989-1993 Barbara | }; Bill_Clinton 1993-2001 Hillary person presidents[6 ]; George_W_Bush 2001-2009 Laura Write a program to do the following | a. Function copyData("data.txt, presidents); to copy records from file data.txt into array presidents Name Years Served Wife's Name b. Function displayAll(presidents); to display a 3 columns Joe_Biden............2021-present............Jill Table (use members) with heading: Jimmy_Carter...... 1977-1981...... Rosalynn Ronald Reagon.... 1981-1989. .....Nancy Name, Years Served, and wife's Name George_Bush....... 1989-1993........Barbara Format your output so that all names and years Bill_Clinton.......... 1993-2001...... ....Hillary served line up left justified. The wife's name must George_W_Bush.. 2001-2009......... Laura end up at the same column by using right justification function
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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