Question: 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
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
Get step-by-step solutions from verified subject matter experts
