linux 的密码问题 ---不带显示的
2016-11-13 23:21
148 查看
编写源文件:secert.c
[cpp] view
plain copy
print?
#include<stdio.h>
#include<curses.h>
int main()
{
char p[20];
printf("Please Input password:");
initscr();//该函数是启动curses模式,在此是关闭了终端回显,实现密码效果
scanf("%s",p);
endwin();//该函数是关闭curses模式。在此即恢复终端回显
printf("Your password is:%s\n",p);
return 0;
}
编译:gcc secret.c -o secret -lcurses
执行:./secret
输入密码后,按回车
[cpp] view
plain copy
print?
#include<stdio.h>
#include<curses.h>
int main()
{
char p[20];
printf("Please Input password:");
initscr();//该函数是启动curses模式,在此是关闭了终端回显,实现密码效果
scanf("%s",p);
endwin();//该函数是关闭curses模式。在此即恢复终端回显
printf("Your password is:%s\n",p);
return 0;
}
编译:gcc secret.c -o secret -lcurses
执行:./secret
输入密码后,按回车
相关文章推荐
- [Linux C]RedHat环境下密码显示问题
- Linux下jdk1.5的安装及中文显示问题解决方案
- 关于Linux下中文显示不正常的问题的一点经验
- 解决linux下jdk1.5中flash等显示中文为方块的问题
- [转]解决Linux下Firefox Flash文字乱码或不能显示的问题
- [转]解决Linux下Firefox Flash文字乱码或不能显示的问题
- jfreechart图表在linux上运行不显示的问题.txt
- Ubuntu 9.04更新后桌面无法显示问题的解决(输入密码后死机)
- 解决linux的root密码丢失问题(附图说明)
- linux之忘记密码及修改fstab文件造成不能登录问题
- netbeans 5.5和6.1问题,在中文linux环境下显示都是方框;怎么把多语言版变成英文版?
- 最近在看一些关于字符集的文章,什么iso8859-1 unicode utf8 gb2312,突然想起在linux终端上显示汉字的问题.
- 解决Linux的Root密码丢失问题(来自网上...)
- 关于Linux与Windows文件共享中的用户及密码问题
- 解决JasperReport在Linux下无法显示的问题!
- JBuilder2006在Linux下安装及的中文显示问题的解决方法
- 解决Linux显示乱码的问题
- linux操作之:设置控制台的分辨率,中文显示以及scim的问题
- 如何解决 linux 操作系统显示中文乱码问题?
- linux终端显示汉字问题