Write a template-based class that implements a set of items. The class should allow the user to
a. Add a new item to the set.
b. Get the number of items in the set.
c. Get a pointer to a dynamically created array containing each item in the set.
The caller of this function is responsible for deallocating the memory.
Test your class by creating sets of different data types (e.g., integers, strings).
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.