Questions
- Replace your template
Arrayclass from your exercise from Chapter 13, Working with Templates, with an STLvector. Create avectorofStudentinstances. Usevectoroperations to insert, retrieve, print, compare, and remove objects from the vector. Alternatively, utilize an STLlist. Use this opportunity to utilize the STL documentation to navigate the full set of operations available for these classes.
a. Consider what operators, if any, you will need to overload. Consider whether you will need an iterator to provide safe interleaved access to your collection.
b. Create a second vector of Student instances. Assign one to another. Print both vectors.
- Modify the
mapfrom this chapter to index the hash table (map) ofStudentinstances based onlastNamerather thanstudentId. - Modify the
queueexample from this chapter to instead utilizepriority_queue. Be sure to make use of the priority enqueueing mechanismpriority_queue::emplace()to add elements...