Question: C++ PROGRAMMING QUESTION: Create a struct called Employee. The struct should have the following members: firstName: string lastName: string pay: int Create a dynamic array

C++ PROGRAMMING QUESTION:

Create a struct called Employee. The struct should have the following members:

firstName: string

lastName: string

pay: int

Create a dynamic array of n employee variables where n is a number entered by the user. The loop through the array and let the user input the data for each employee. Create a function that expects a pointer to the array as input and prints the elements in the array. Remember that arrays are passed by reference, any modifications inside the function will be reflected in the caller's array.

Example:

Number of employees: 2

Employee 1

First Name: Barry

Last Name: Allen

Pay: 3000

Employee 2

First Name: Jessica

Last Name: Wilder

Pay: 6000

Employees:

Name: Barry Allen (3000)

Name: Jessica Wilder (6000)

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!