- 博客(2)
- 收藏
- 关注
原创 C语言中gets是危险函数,用fgets代替
gets函数在Linux的GCC编译下总是通不过,会报错:“the 'gets' function is dangerous and shout not be used.”,因为由于gets()无法知道字符串的大小,必须遇到换行字符或文件尾才会结束输入,因此容易造成缓存溢出的安全性问题。通过fgets来代替。那么fgets函数该怎么用呢?使用方法举例#include main(){
2017-02-22 20:04:27
5437
2
转载 Linux中数据库mysqladmin登录错误的解决办法
在Linux中登录MySQL设置密码,使用如下语句mysqladmin -u root -p,之后提示登录密码,但是忘记之前的登录密码了,出现如下提示:mysqladmin: connect to server at 'localhost' failed 怎么办呢???这样做: 用 service mysqld stopmysqld_safe --skip-grant-t
2017-02-21 19:45:06
630
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人