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
272025 Nguyễn Vương Vũ CHẤM ĐIỂM TRẮC NGHIỆM C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 588 2023-11-21 10:17:29

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:5:10: error: ‘i’ was not declared in this scope
     for (i=1, i<=n, i++)
          ^
Main.cc:5:18: error: ‘n’ was not declared in this scope
     for (i=1, i<=n, i++)
                  ^
Main.cc:9:5: error: expected primary-expression before ‘char’
     char dad[i];
     ^~~~
Main.cc:9:5: error: expected ‘)’ before ‘char’
Main.cc:10:10: error: ‘i’ was not declared in this scope
     for (i=1, i<=n, i++)
          ^
Main.cc:10:18: error: ‘n’ was not declared in this scope
     for (i=1, i<=n, i++)
                  ^
Main.cc:14:5: error: expected primary-expression before ‘for’
     for(i=1, i<=t, i++) 
     ^~~
Main.cc:14:5: error: expected ‘;’ before ‘for’
Main.cc:14:5: error: expected primary-expression before ‘for’
Main.cc:14:5: error: expected ‘)’ before ‘for’
Main.cc:14:17: error: ‘t’ was not declared in this scope
     for(i=1, i<=t, i++) 
                 ^
Main.cc:14:17: note: suggested alternative: ‘tm’
     for(i=1, i<=t, i++) 
                 ^
                 tm
Main.cc:18:5: error: expected primary-expression before ‘char’
     char da[i];
     ^~~~
Main.cc:18:5: error: expected ‘)’ before ‘char’
Main.cc:19:10: error: ‘i’ was not declared in this scope
     for (i=1, i<=n, i++)
          ^
Main.cc:19:18: error: ‘n’ was not declared in this scope
     for (i=1, i<=n, i++)
                  ^
Main.cc:25:5: error: ‘result’ was not declared in this scope
     result = strcmp(dad,da);
     ^~~~~~
Main.cc:25:21: error: ‘dad’ was not declared in this scope
     result = strcmp(dad,da);
                     ^~~
Main.cc:25:25: error: ‘da’ was not declared in this scope
     result = strcmp(dad,da);
                         ^~
Main.cc:25:14: error: ‘strcmp’ was not declared in this scope
     result = strcmp(dad,da);
              ^~~~~~
Main.cc:25:14: note: suggested alternative: ‘strtoq’
     result = strcmp(dad,da);
              ^~~~~~
              strtoq
Main.cc:26:5: error: expected primary-expression before ‘if’
     if(result == 0)
     ^~
Main.cc:26:5: error: expected ‘)’ before ‘if’