unexpected closing bracket a1
This commit is contained in:
parent
1833160385
commit
a172a9c5d1
@ -35,9 +35,9 @@ int main()
|
||||
}
|
||||
else if (ch == ')' || ch == '}' || ch == ']' || ch == '>')
|
||||
{
|
||||
if (top == 0)
|
||||
if (top == -1)
|
||||
{
|
||||
printf("Crossed bracket %c in %d, expected opening bracket\n", ch, i);
|
||||
printf("Unexpected closing bracket %c in %d\n", ch, i);
|
||||
return 0;
|
||||
}
|
||||
else if (!isMatchingPair(stack[top], ch))
|
||||
|
Loading…
Reference in New Issue
Block a user