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
132565 Tạ Duy An Chuỗi lặp lại C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 761 2023-06-30 20:16:22

Lỗi biên dịch:

Main.cc: In function ‘int check(char*)’:
Main.cc:7:20: error: ‘string’ was not declared in this scope
     int n = strlen(string);
                    ^~~~~~
Main.cc:7:20: note: suggested alternative: ‘stdin’
     int n = strlen(string);
                    ^~~~~~
                    stdin
Main.cc: In function ‘int main()’:
Main.cc:30:13: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
     gets(str);
             ^
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:27:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
Main.cc:30:9: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
     gets(str);
     ~~~~^~~~~