Accepted
foo.cc: In function 'void Concat(const char*, const char*, char*)': foo.cc:9:9: warning: unused variable 'len2' [-Wunused-variable] 9 | int len2 = strlen(str2); | ^~~~ foo.cc:12:12: warning: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-truncation] 12 | strncpy(result, str1, len1 - 1); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ foo.cc:8:22: note: length computed here 8 | int len1 = strlen(str1); | ~~~~~~^~~~~~
信息
- 递交者
- 类型
- 递交
- 比赛
- 2024-3-22 信息教师练习赛(3)
- 语言
- C++
- 递交时间
- 2024-03-23 11:43:35
- 评测时间
- 2024-03-23 11:43:35
- 评测机
- 分数
- 100
- 总耗时
- 14ms
- 峰值内存
- 548.0 KiB