查看: 1484|回复: 9
|
求助: C program (提款机密码)
[复制链接]
|
|
怎样才能让那些密码变成黑点或米(*)?? |
|
|
|
|
|
|
|
发表于 20-9-2006 11:53 AM
|
显示全部楼层
TextBox 的 Attribute :
Font = "Windings"
PasswordChar = "l" && Small letter of L |
|
|
|
|
|
|
|

楼主 |
发表于 27-9-2006 05:12 PM
|
显示全部楼层
原帖由 白日梦 于 20-9-2006 11:53 AM 发表
TextBox 的 Attribute :
Font = "Windings"
PasswordChar = "l" && Small letter of L
我有点不明白...
对不起,因我有一段时间没动programing了
可以麻烦白日梦详细解说吗?
谢谢 |
|
|
|
|
|
|
|
发表于 3-10-2006 01:03 PM
|
显示全部楼层
你看一下拉,我不是很会解释...
//function to checking password
int password()
{
int ch;
char user_in[50];
char read[50];
ifstream read_pass("pass.txt");
if(read_pass.fail())
cerr<<"ERROR";
passagain:cout<<"Enter the correct password to access the program\n";
fflush(stdout);
int i=0;
while ((ch = getch()) != EOF && ch != '\n' && ch != '\r') //&&i<10)
{
if (ch == '\b' && i > 0)
{
cout<<"\b \b";
fflush(stdout);
i--;
user_in = '\0';
}
else if (isalnum(ch))
{
putchar('*');
user_in[i++] = (char)ch;
}
}
user_in = '\0';
read_pass.getline(read, 50);
if(strcmp(user_in,read)){
cout<<"\nAccess denied\n\n";
read_pass.seekg(0);
read_pass.clear();
goto passagain;
}
return 0;
} |
|
|
|
|
|
|
|
发表于 4-10-2006 09:23 AM
|
显示全部楼层
原帖由 阿嬷 于 27-9-2006 05:12 PM 发表
我有点不明白...
对不起,因我有一段时间没动programing了
可以麻烦白日梦详细解说吗?
谢谢
C的我不会,那是 Visual Foxpro 写法。 |
|
|
|
|
|
|
|
发表于 7-10-2006 09:38 AM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 7-10-2006 10:38 AM
|
显示全部楼层
原帖由 evo9 于 3-10-2006 01:03 PM 发表
你看一下拉,我不是很会解释...
//function to checking password
int password()
{
int ch;
char user_in;
char read;
ifstream read_pass("pass.txt" ;
if(read_pass.fail())
c ...
这是C++的code吧 ? |
|
|
|
|
|
|
|
发表于 7-10-2006 07:08 PM
|
显示全部楼层
原帖由 阿嬷 于 7-10-2006 10:38 AM 发表
这是C++的code吧 ?
C++ 和 C 差不远。
你只要把cout 变printf, cin 变scanf 就可以了.
 |
|
|
|
|
|
|
|

楼主 |
发表于 12-10-2006 12:26 PM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 12-10-2006 04:35 PM
|
显示全部楼层
|
|
|
|
|
|
| |
本周最热论坛帖子
|