biiig please

From: Andre (andrehull_at_poczta.fm)
Date: 10/29/03


Date: Wed, 29 Oct 2003 13:48:42 +0100

hi!

can anyone finish this part of code for me? i think it wont take long :)

#include <string.h>
#include <stdio.h>

class Stack {
 private:
  int *s;
  int size, sp;
 public:
  Stack (int ASize);
  Stack (Stack &As);
  ~Stack();
  void push (int Ax);
  int pop (void);
  int free (void);
  int empty (void);
  int full (void);
 };

/*right here define constructors, destructor i metods of class Stack */

 main()
 {
  class Stack ssl(10);
  int x, koniec = 0;
  char= c;

  while(!koniec)
   {
    printf("%c STOS(%d) ", ssl.empty() ?
     'E' : ssl.full() ? 'F' : ' ',
     ssl.free());
    scanf("%c", &c);
    switch(c)
     {
     case '<' : scanf("%d", &x);
         ssl.push(x);
         brake;
     case '>' : if(!ssl.empty())
      {
       x=ssl.pop();
       printf("X=%d\n", x);
      }
      brake;
     case 'Q' :
     case 'q' : kniec = 1;
         brake;
     }
     fflush(stdin);
   }
   return 0;
 }

thanks for you help
regards
Andre



Relevant Pages

  • Help in Java swings(internal Frame)
    ... public int getSize() ... public void valueChanged{ ... private JScrollPane scrollPane1; ... public class PeakContainer extends JInternalFrame ...
    (comp.lang.java.programmer)
  • [PATCH] get rid if __cpuinit and __cpuexit
    ... unsigned long action, void *hcpu) ... unsigned int cpu = hcpu; ... -static int __cpuinit ... __cpu_up(unsigned int cpu) ...
    (Linux-Kernel)
  • [PATCH,RFC 2.6.14 09/15] KGDB: SuperH-specific changes
    ... This adds basic support for KGDB on SuperH as well as adding some architecture ... -static int kgdb_uart_getchar ... -static void kgdb_uart_putchar ... * The command-line option can include a serial port specification ...
    (Linux-Kernel)
  • problem in java swings
    ... public int getSize() ... public void valueChanged{ ... private JScrollPane scrollPane1; ... public class PeakContainer extends JInternalFrame ...
    (comp.lang.java.programmer)
  • ToolTips in a View and TTN_NEEDTEXT
    ... extern int g_minWorkPeriod; ... void CDayView::CreateAllFonts ... void CDayView::DrawDayLog(CDC* pDC) ... BOOL CDayView::TimeToY ...
    (microsoft.public.vc.mfc)