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
271620 Trần Phú Quốc CHẤM ĐIỂM TRẮC NGHIỆM C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 408 2023-11-21 09:32:56

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:18:11: error: too few arguments to function ‘void kiemtra(char*, char*, int)’
  kiemtra(s);
           ^
Main.cc:5:6: note: declared here
 void kiemtra(char s[], char s2[], int n){
      ^~~~~~~
Main.cc:20:15: warning: too many arguments for format [-Wformat-extra-args]
   scanf("s", s);
               ^
Main.cc:22:8: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
  gets(s);
        ^
In file included from /usr/include/stdio.h:862:0,
                 from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
Main.cc:23:9: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
  gets(s2);
         ^
In file included from /usr/include/stdio.h:862:0,
                 from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
Main.cc:24:15: warning: too many arguments for format [-Wformat-extra-args]
  printf("s", s);
               ^
Main.cc:20:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("s", s);
   ~~~~~^~~~~~~~
Main.cc:22:6: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
  gets(s);
  ~~~~^~~
Main.cc:23:6: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
  gets(s2);
  ~~~~^~~~