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
465635 Thành tích CHUỖI KÍ TỰ MỞ VÀ ĐÓNG C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 427 2024-05-24 14:26:03

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:38: error: expected ‘)’ before ‘{’ token
   11 |         for(int j=x.length(); j>0;j--{
      |            ~                         ^
      |                                      )
Main.cc:12:37: error: invalid types ‘int[int]’ for array subscript
   12 |                 if((x[i] == '{' && j[i] == '}') ||
      |                                     ^
Main.cc:13:42: error: invalid types ‘int[int]’ for array subscript
   13 |                         (x[i] == '(' && j[i] == ')') ||
      |                                          ^
Main.cc:14:42: error: invalid types ‘int[int]’ for array subscript
   14 |                         (x[i] == '[' && j[i] == ']') ||
      |                                          ^
Main.cc:15:42: error: invalid types ‘int[int]’ for array subscript
   15 |                         (x[i] == '<' && j[i] == '>')) {
      |                                          ^