home *** CD-ROM | disk | FTP | other *** search
/ ftp.disi.unige.it / 2015-02-11.ftp.disi.unige.it.tar / ftp.disi.unige.it / pub / .person / CataniaB / teach-act / esempi / Comp-Sep / main.c < prev    next >
C/C++ Source or Header  |  1997-04-19  |  293b  |  23 lines

  1. #include "stack.h"
  2.  
  3. void main(void)
  4. {
  5.  dlist L;
  6.  stack S; 
  7.  int x,y;
  8.  
  9.  init(&L);  
  10.  init_stack(&S);
  11.  push(4,5,&S);
  12.  push(6,7,&S);
  13.  push(7,8,&S);
  14.  top(&x,&y,&S);
  15.  printf("\n Top: (%d,%d)",x,y);  
  16.  print_stack(&S); 
  17.  
  18.  insert_head(5,9,&L); 
  19.  insert_head(8,10,&L);
  20.  delete_head(&L);
  21.  print(&L);
  22. }
  23.