每当我尝试使用gets()函数输入我的字符串时,我的编译器会给出警告,如下所示.如何摆脱这个.我究竟做错了什么?
gets()
test.c:27:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(temp); ^
gcc compiler-warnings suppress-warnings
compiler-warnings ×1
gcc ×1
suppress-warnings ×1