C++ Project
Note:
main.cpp is already provided with this project andcannot be edited
dynarray.h is what needs to be written
Project Objective:
Successfully implement a generic class using templates inC++.
Step 1
Starting with a copy of your DynArray class, add the followingmember functions:
- int& back()
This function returns the value of the last integer in the usedportion of the vector, but it does not remove it. Throw aruntime_errorif the vector is empty. This function returns byreference. - int& front()
This function returns the value at the beginning the vector, but itdoes not remove it. Throw a runtime_error if the vector is empty.This function returns by reference. - DynArray(const DynArray& origObject)
This copy constructor doesOROR