Exemple #1
0
        private void bt_mehet_Click(object sender, EventArgs e)
        {
            Verem <char> stack = new Verem <char>(255);
            string       str   = eredeti.Text;

            stack.Clear();
            for (int i = 0; i < str.Length; i++)
            {
                stack.Push(str[i]);
            }
            char   temp;
            string reversed = "";

            for (int i = 0; i < str.Length; i++)
            {
                stack.Pop(out temp);
                reversed += temp;
            }
            megcserelt.Text = reversed;
        }