Answered step by step
Verified Expert Solution
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:
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 use only simple #include library, add comments and show output
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