Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
465547 Thành tích CHUỖI KÍ TỰ MỞ VÀ ĐÓNG C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 380 2024-05-24 14:16:48

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:10:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   10 |         for(int i = 0 ; i < x.length(); i++) {
      |                         ~~^~~~~~~~~~~~
Main.cc:11:32: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   11 |                 if(x[i] == '{' && x[i + 1] == '}'||
Main.cc:13:37: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   13 |                         x[i] == '[' && x[i + 1] == ']' ||
Main.cc:14:37: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   14 |                         x[i] == '<' && x[i + 1] == '>' ||) {
Main.cc:14:58: error: expected primary-expression before ‘)’ token
   14 |                         x[i] == '<' && x[i + 1] == '>' ||) {
      |                                                          ^