Question: Q 3 ) [ 4 marks ] Write a non - member function named TrimAfter that takes an arrayListType object by reference and an index
Q marks Write a nonmember function named TrimAfter that takes an arrayListType object by reference and an index trimpoint. The function removes all the items in the list after the index trimpoint.
For example, if the list contains the elements and you call the TrimAfter the list content should become:
Notice that the size of the list after TrimAfter trimpoint is trimpoint. So when trimpoint then the list becomes empty.
For your convenience, the arrayListType class declaration is provided on the right.
Do all the required error checking.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
