cant figure out the error
code:
#include
#include
#include
using namespace std;
bool balanceP(string *s){
stack stk;
for(int i=0;i!=β\0β;i++){
string ch=s[i];
if(ch==β(β){
stk.push(ch);
}
else if(ch==β)β){
if(stk.empty() or stk.top()!=β(β){
return false;
}
stk.pop();
}
}
return stk.empty();
}
int main(){
string s[100];
cin>>s;
if(balanceP(s)){
cout<<βYesβ<<endl;
}
else{
cout<<βNoβ<<endl;
}
return 0;
}