错误:undefined reference to 'gets' 解决方法:gets()函数在最新的C标准中已经被弃用,很多编译器不再支持。可以使用fgets()函数替代gets()。 错误:warning: implicitly declaring library function 'gets' with type 'char * (char *)' 解决方法:同样使用fgets()函数来代替gets()。 使用fgets()函数可以更好地确...
gets把从stdin中输入的一行信息存入cmd中,然后将换行符置换成串结尾符NULL。用户要保证缓冲区的长度大于或等于最大的行长。 gets的详细解释: char * gets ( char * str );//Get string from stdin Reads characters from stdin and stores them as a string into str until a newline character ('\n') or...