Im trying to make an login menu in Visual studio 6.0. I want the password to be typed in as '*' , so you cant se the real password on the screen. Im building a MS-DOS interface. Here is the code we allready have tried and it didn't work..
#include <iostream.h>
#include <conio.h>
main ()
{
int c=0;
char buffer[20];
char a;
char n[11];
cout << "Name: ";
cin >> n;
cout << "Password: ";
while(a != '\n')
{
a=getch();
buffer[c]=a;
cout<<"*";
c++;
}
cout<<buffer;
return 0;
}