Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions