Hi,
I am write code about stack[pop,push,overflow,underflow]
but i think i have Mistake in underflow and overflow ..
and how i can Enter any thing in my array ..
like if i want to enter [$] or[xxxxx] whatever not only int
if you can correct in same code >>
#include<iostream.h>
void main()
{
int x;
int a[1000];
int i;
cout<<"Enter your size:";
cin>>x;
cout<<"Enter your element\n";
for(i=0;i<x;i++){
cout<<"Enter your num"<<i<<":";
cin>>a[i];
}
if(i==x)
cout<<"array is overflow\n";
else
cout<<"Under flow\n";
for(i=x-1;i>=0;i--)
cout<<"The element pop from index "<<i<<"::"<<a[i]<<"\n";
}
//}