Balanced parathensis

#include
#include
using namespace std;
bool checkbalancedparanthesis(string str){
stack s;
for(int i=0;i<str.size();i++){
char curchar=str[i];
if(curchar==’(’){
s.push(curchar);
}
else if(curchar==’)’){
if(s.empty()||s.top()!=’(’){
return false;
}
s.pop();
}
}
return s.empty();
}
int main() {
string exp;
cin>>exp;
bool isvalid=checkbalancedparanthesis(exp);
if(isvalid){
cout<<β€œYes”;
}
else
cout<<β€œNo”;
}
why it is not passing all test cases…

@tishya_goyal
You are given a string of brackets i.e. β€˜{’, β€˜}’ , β€˜(’ , β€˜)’, β€˜[’ , β€˜]’ .
There are other types of brackets as well.