Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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 "vector1.pop()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions