Is this possible? The idea is typing a password and it being translated to asterisks on the fly- pretty much like a password field on HTML. I've written this code, but it converts the input AFTER the user presses enter, not while he/she is typing.
#include <stdio.h>
#include <string.h>
#include <iostream>
int main()
{
char password[11]; int i, j;
printf("Enter the password : ");
gets(password);
system("cls");
int str_len = (int)strlen(password);
printf("Enter the password : ");
for(i = 0;i<2;i++)
{
printf(" ");
for(j=0;j<str_len/2;j++)
{
printf("*");
}
}
system("PAUSE>nul");
}