问题
D:\site\c\hello\main.cpp:15:5: error: 'strcpy' was not declared in this scope
15 | strcpy(mine.title, "hilibote");
| ^~~~~~
D:\site\c\hello\main.cpp:2:1: note: 'strcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
1 | #include <iostream>
+++ |+#include <cstring>
2 | #include <string>
mingw32-make.exe[3]: *** [CMakeFiles\hello.dir\build.make:62: CMakeFiles/hello.dir/main.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:72: CMakeFiles/hello.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:84: CMakeFiles/hello.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:117: hello] Error 2
原因
'strcpy' is defined in header '<cstring>'
解决
使用头文件
#include <cstring>