Question: C++ Create a class template that contains two private data members: T * array and int size. The class uses a constructor to allocate the

C++

C++ Create a class template that contains two private data members: T

Create a class template that contains two private data members: T * array and int size. The class uses a constructor to allocate the array based on the size entered. There is member function that allows the user to fill in the array based on the size. In addition, there is a member function that sorts the array and displays the sorted elements. Use the destructor to delete the array. Develop the main() to create two objects to call member functions. As a result, the first object will hold its array of double type, and the other will hold its array of the int type

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!