0_0_23217202_29517.cpp: In function 'int main()':
0_0_23217202_29517.cpp:20:32: error: expected statement at end of input
if(ch=='('||ch=='[') //遇到'(' ']'就push s.push(ch); if(ch==')'||ch==']') { if(s.empty()) //如果匹配时栈顶为空,说明绝对是不匹配的 flag=0; else if((s.top()=='('&&ch==')')||(s.top()=='['&&ch==']')) //匹配成功 s.pop(); } } if(flag==1&&s.empty()) cout<<"Yes"<<endl; else cout<<"No"<<endl; }}
^
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input
0_0_23217202_29517.cpp:20:32: error: expected '}' at end of input
|