About Me

stack using

welcome to message:
                     stack using array    
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#define max size 10
class stack
{
private:
int top;
int a[maxsize];
public:
stack()
{
top=-1;
}
void push(int);

int pop(void);
void show(void);
};
void stack::push(int m)
{
if(top+1==maxsize)
{
cout<<"\n stack is full";
getch();
}
else
{
a[++top]=m;
cout<<"\n push success \n";
getch();
}
}
int stack::pop(void)

Post a Comment

0 Comments

Welcome

BODY

How to prevent Right Click option using jquery

Try right-click on the page