记录详情

Compile Error

foo.c: In function 'main':
foo.c:8:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
    8 |     gets(s1);
      |     ^~~~
In file included from /usr/include/stdio.h:867,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.c:9:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
    9 |  gets(s2);
      |  ^~~~
In file included from /usr/include/stdio.h:867,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.c:12:6: error: 'i' undeclared (first use in this function)
   12 |  for(i=0;i<a;i++)
      |      ^
foo.c:12:6: note: each undeclared identifier is reported only once for each function it appears in
foo.c:14:20: warning: comparison between pointer and integer
   14 |   if(s1[i]>='a'&&s1<='z')
      |                    ^~
foo.c:19:20: warning: comparison between pointer and integer
   19 |   if(s2[i]>='a'&&s2<='z')
      |                    ^~
foo.c:8:5: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
    8 |     gets(s1);
      |     ^~~~~~~~
foo.c:9:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
    9 |  gets(s2);
      |  ^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P2998 A8-2 字符串的统计函数
语言
C
递交时间
2022-01-09 17:37:19
评测时间
2022-01-09 17:37:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes