Question: [C++]Write a template Array class that can accept any type of numeric data, character data or string data. The array should be dynamically created based
[C++]Write a template Array class that can accept any type of numeric data, character data or string data. The array should be dynamically created based on size entered by the user. Then write the code for a recursive selection sort algorithm in a function of its own - to sort the data in the descending order. In your interactive main, ask the user for the type of data items to be entered and the number of data items of that type the array will hold. You can limit the types of data to 'int', 'double', 'char' and 'string'. Then the program should get that many data items from the user but no data validation is needed - you can expect that the user will not make any error in entering the data items. Finally sort the data in descending order using your sort function and print the how the array looks at the end of every sort step.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
