Using Classes

Nov 14, 2016 at 3:49am
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.
Nov 14, 2016 at 3:50am
What part are you doing now? Have you started your assignment yet?
Nov 14, 2016 at 5:20am
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
Nov 14, 2016 at 5:53am
I'd guess the intended way is to decrement size, assuming it's greater than 0.
Last edited on Nov 14, 2016 at 5:54am
Topic archived. No new replies allowed.