Modify the class by adding a private int pointer that will


I need help with the following problems C++. Please try to make the code as simple as possible and answers every questions.

Pointers

Modify the class by adding a private int pointer that will be used as an array. Create another overloaded constructor that takes an int pointer and int size as parameters. The constructor allocates the pointer to be an array based on the parameter size (if the size is greater than 0.) and the array parameter is copied to the pointer ( a loop is a must to copy one element at a time). Then it calls a private member function of the class that displays array elements. Come up with that private member function. Where should you delete the pointer? The main( ) should have an array that is passed to the overloaded constructor when an object is instantiated.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Modify the class by adding a private int pointer that will
Reference No:- TGS01146069

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)