It is always better to continue these threads on the board rather than take it to e-mail. First, I am not in the office that often, you were lucky, second, nobody else learns anything!
Code:
#include <stdio.h>
#include <conio.h>
main ()
{
int c=0;
char buffer[20];
char a;
char n[11];
bool Continue = 1;
printf("Name: ");
scanf("%s",&n);
printf("Password: ");
while (Continue)
{
a=getch();
if (a == 13)
{
Continue = 0;
buffer[c] = 0;
}
else
{
buffer[c]=a;
printf("*");
c++;
}
};
printf("\n%s\n",buffer);
return 0;
}
This is a bit nasty as I didn't have a lot of time, but basically works with VC6.