class StackOfIntegers{
int * stackbottom;
static increaseBlockSize = 0x0A;
int totalSize = 0;
int * stacktail;
int* stacktop;
}
StackOfIntegers ::StackOfIntegers(){
totalSize = increaseblockSize;
statckbottom = new int[totalSize ];
statcktop = statckbottom;
statcktail = statckbootom+totalSize*sizeof(int);
}
bool StackOfIntegers::push(int addInt){
if stacktop == statcktail{
int * newstack = new int[totalsize+increaseBlockSize]
for(int i = 0; i < totalsize;++i)
newstatck[i]=statckbotton[i]
delete statckbottom;
statckbottom = newstatck;
totalsize += increaseBlockSize;
statcktail = statckbottom +totalsize*sizeof(int);
}
*stacktop = addint;
statcktop += sizeof(int);
}