예제 #1
0
 static void Main(string[] args)
 {
     LIFO l = new LIFO();
     int i;
     for (i = 0; i < 10; i++)
         l.Add(i);
     Console.WriteLine(l.ToString());
     Console.ReadLine();
     int h = l.Head();
     LIFO t = l.Tail();
     Console.WriteLine("Head:\t" + h);
     Console.WriteLine("Tail:\t" + t);
     Console.ReadLine();
 }
예제 #2
0
 public LIFO(int x)
 {
     this.czy_null = false; this.head = x; this.tail = NullLIFO;
 }
예제 #3
0
 public LIFO(int h, LIFO t)
 {
     this.czy_null = false;
     this.head     = h;
     this.tail     = t;
 }
예제 #4
0
 public LIFO()
 {
     this.czy_null = true;
     this.tail     = null;
     this.head     = 0;
 }
예제 #5
0
 public LIFO(int x)
 {
     this.czy_null = false; this.head = x; this.tail = NullLIFO;
 }
예제 #6
0
 public LIFO(int h, LIFO t)
 {
     this.czy_null = false;
     this.head = h;
     this.tail = t;
 }
예제 #7
0
 public LIFO()
 {
     this.czy_null = true;
     this.tail = null;
     this.head = 0;
 }