컴파일 에러의 문구를 잘 읽어보면 어디서 에러가 발생하는지를 알 수 있습니다.
In file included from main.cpp:1:
/usr/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
main.cpp:37:82: error: expected ‘)’ before ‘{’ token
37 | if(s.empty() || (a[s.top()] != '(' && !s.empty())
| ~ ^
| )
38 | {
| ~
main.cpp:46:25: error: expected primary-expression before ‘}’ token
46 | }
| ^괄호가 제대로 닫히지 않아 컴파일 에러가 발생합니다. 괄호가 제대로 닫히지 않은 부분은 37번째 줄이라고 하네요.

sondong0328 2년 전
컴파일 에러가 뜨는 에러가 뭘까요?