Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write simple C++ code for the following: use only simple #include library, add comments and show output a constructor that takes a name, a salary

Write simple C++ code for the following:
use only simple #include library, add comments and show output
image text in transcribed
a constructor that takes a name, a salary object and job description and assigns these to the members of the new object. 1. Declare memory (or char array) to copy the name in. 2. store the location of this array in the pointer called namePtr 3. Copy the contents of salary type argument to the salary member variable. 4. Declare memory or char array to copy the job description in. 5. store the location of this array in the pointer called DescPtr print function that prints out the members of the object

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

How many multiples of 4 are there between 10 and 250?

Answered: 1 week ago

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago