Can someone check my work to make sure I did the following correct...
The array-based implementations of stacks in this section impose and upper limit on the max size that a stack may have. Write a member function full() for the stack class that returns true or false according to whether or not the array used to store the stack elements is full...
Here is my code...
bool checkinput(string input,int max,char stack[])
{char m=' ';
int n=0,i=0;
while(i<input.size()&&m!='z')
{if(input[i]=='{')
push(stack,n,max,input[i]);
else if(input[i]=='}')
m=pop(stack,n);
i++;
}
if(m!='x'&&n==0)
return true;
else
return false;