Compiler output
prog.cpp: In function 'bool isValid(char, char)':
prog.cpp:6:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
return a == '(' && b == ')' ||
^
prog.cpp:8:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
a == '{' && b == '}' ||
^
prog.cpp:9:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
a == '|' && b == '|';
^
prog.cpp: In function 'int main()':
prog.cpp:17:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < s.size(); ++i) {
^