记录详情

Accepted

foo.cc: In function ‘int main()’:
foo.cc:25:13: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
   25 |         gets(c1);gets(c2);
      |         ~~~~^~~~
In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/cstdio:42,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ext/string_conversions.h:45,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.h:4154,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/string:54,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bitset:52,
                 from stdc++.h:52:
/nix/glibc-2.40-66-dev/include/stdio.h:667:14: note: declared here
  667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.cc:25:22: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
   25 |         gets(c1);gets(c2);
      |                  ~~~~^~~~
/nix/glibc-2.40-66-dev/include/stdio.h:667:14: note: declared here
  667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
/nix/binutils-2.44/bin/ld: /tmp/cckoMtXx.o: in function `main':
foo.cc:(.text.startup+0x7): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Accepted 2ms 508.0 KiB
#2 Accepted 2ms 504.0 KiB
#3 Accepted 2ms 760.0 KiB
#4 Accepted 3ms 504.0 KiB
#5 Accepted 2ms 504.0 KiB

信息

递交者
类型
递交
题目
A8-4 字符串的连接函数
语言
C++
递交时间
2025-08-14 15:40:28
评测时间
2025-08-14 15:40:28
评测机
分数
100
总耗时
14ms
峰值内存
760.0 KiB