Added parentheses validation cpp