Hi,
I am trying (Push)add data into my stack (length of five) and (Pop)delete from the end of my stack.
I need to know how can:
- Add the elements to the stack with keeping track of adding and deleting from it (adding an element will increment until 5 and deleting would decrement until the stack is empty).
Thank you in advance.
Private Sub Button1Push_Click(sender As System.Object, e As System.EventArgs) Handles Button1Push.Click
Dim Stack(4) As String
Dim userMsg As String
userMsg = InputBox("Push", "Stacks", "Enter your letter here", 500, 500)
For Index = 0 To userMsg.Length - 1
Next
End Sub
Private Sub Button2Pop_Click(sender As System.Object, e As System.EventArgs) Handles Button2Pop.Click
End Sub