C语言Pass函数用法,getpass()函数

#include

#include

char *getpass(const char* prompt);

The getpass() function opens the process' controlling terminal, writes the specified prompt, disables echoing, reads a string of characters up to the next newline character or EOF, restores the terminal state and closes the terminal.

promptPoints to the prompt string to be displayed.

On success, getpass() returns a pointer to a null-terminated string of at most _PASSWORD_LEN bytes that was read from the terminal device. On error, it restores the terminal state and returns a null pointer.

UNIX 98.

Unsafe.

Use of this function is deprecated. It may be withdrawn in a future release.

MKS Toolkit for Professional Developers

MKS Toolkit for Enterprise Developers

MKS Toolkit for Enterprise Developers 64-Bit Edition

C语言库函数 getpass

函数名: getpass

功  能: 读一个口令

用  法: char *getpass(char *prompt);

程序例:

#include int main(void)

{

char *password;

password = getpass("Input a password:");

cprintf("The password is: %s/r/n",

password);

return 0;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值