Using Classes

Write a public member function string delete_last(). This function deletes the last item added to the parallel arrays. When the item is deleted, it should no longer be included when calculating the total.

How would I go about doing this? If I am using a string array, how would set it up so that when I call it, it would just delete the previous.

Example:
User type:
Pine
Tree
Cone
Wind

delete will be call and Wind will be removed.
What part are you doing now? Have you started your assignment yet?
Yes i have started my assignment... you can find the part where I am stuck at in this website

http://www.codersindex.com/cpp-challenge-20/

i am just currently confused on how to go about doing this
I'd guess the intended way is to decrement size, assuming it's greater than 0.
Last edited on
Topic archived. No new replies allowed.