Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use maxSize as a const int maxSize = 1000; and use pointer. Thanks Use visual studio to create a new C++ project. Your required
Please use maxSize as a const int maxSize = 1000; and use pointer. Thanks
Use visual studio to create a new C++ project. Your required in this task to impalement your own vector class. Your class is named custom_Vector. The class includes at least following member functions: 1. 2. 3. 4. 5. 6. 7. A default constructor that initialize your custom vector objects A destructor to release the memory to the heap. push back(string item) function that appends elements to the end of the vector. pop() function that removes the last element of your vector and returns it. disp() function that displays the elements of the vector. size() function that returns the number of elements in the vector. at(int index) function that returns the element at the position index (assume that the first element in your vector at position 1.) Implement a main function to test your method. Your class accepts only string values. Therefore, you do not need to use templates For example, when I use the following main function int main ) Custom_vector vector1; vector1.push_back("apples"); vector1. push_back ( "bananas"); vector1.push_back("pineapples"); vector1.disp); cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started