Problem bracketex
User TheFelixKS
Submission Time 2026-06-29 11:11:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:23:10: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘top’
23 | if (s.top() != '(') {
| ^~~
bracketex.cpp:28:10: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘top’
28 | if (s.top() != '[') {
| ^~~
bracketex.cpp:33:10: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘top’
33 | if (s.top() != '{') {
| ^~~
bracketex.cpp:38:6: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘emplace’; did you mean ‘replace’?
38 | s.emplace(c);
| ^~~~~~~
| replace