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
95021 TT Chuẩn hoá từ C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 511 2023-05-24 20:39:19

Lỗi biên dịch:

Main.cc: In function ‘void dosth(char*)’:
Main.cc:7:9: error: ‘lstrip’ was not declared in this scope
     a = lstrip(a);
         ^~~~~~
Main.cc:7:9: note: suggested alternative: ‘strsep’
     a = lstrip(a);
         ^~~~~~
         strsep
Main.cc:8:9: error: ‘rstrip’ was not declared in this scope
     a = rstrip(a);
         ^~~~~~
Main.cc:8:9: note: suggested alternative: ‘strsep’
     a = rstrip(a);
         ^~~~~~
         strsep
Main.cc:9:9: error: ‘strlower’ was not declared in this scope
     a = strlower(a);
         ^~~~~~~~
Main.cc:9:9: note: suggested alternative: ‘strtok_r’
     a = strlower(a);
         ^~~~~~~~
         strtok_r
Main.cc:10:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 1; i < strlen(a); i++)
                     ~~^~~~~~~~~~~
Main.cc:12:20: error: ‘toupper’ was not declared in this scope
             a[i] = toupper(a[i]);
                    ^~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:18:5: error: ‘cin’ was not declared in this scope
     cin >> n;
     ^~~
Main.cc:18:5: note: suggested alternative: ‘sin’
     cin >> n;
     ^~~
     sin
Main.cc:21:15: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
         gets(a);
               ^
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:21:13: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result [-Wunused-result]
         gets(a);
         ~~~~^~~