Crap.. Do you know of any way to accomplish this?
I thought this would work:
But then it will still return a '-1' in the last spot?Code:int Stack::pop() { if(current == 0) return 0; else { list.DeleteItem(current); current--; return list.GetItem(current); } }