- #1
Deathfish
- 86
- 0
Homework Statement
Currently using stdio.h, conio.h, string.h, stdlib.h
not using iostream, namespace std etc.
I am asked to make a password prompt where each character echoes an asterisk (*)
The user must be able to backspace and delete to make corrections.
The password is then stored in an array which can accommodate up to 100 passwords.
The attempt at a solution
count=0;
while(c != eof())
{
`c=getch();
if (c != eof())
{
printf("*");
c=pw[userid][count];
count++;
}
}
pw[userid][count] = '\0';
sadly, the output indentation looks horrible and it is uneditable using backspace and delete.
Currently using stdio.h, conio.h, string.h, stdlib.h
not using iostream, namespace std etc.
I am asked to make a password prompt where each character echoes an asterisk (*)
The user must be able to backspace and delete to make corrections.
The password is then stored in an array which can accommodate up to 100 passwords.
The attempt at a solution
count=0;
while(c != eof())
{
`c=getch();
if (c != eof())
{
printf("*");
c=pw[userid][count];
count++;
}
}
pw[userid][count] = '\0';
sadly, the output indentation looks horrible and it is uneditable using backspace and delete.