Joined: 15 Apr 2011 Posts: 314 Location: P. Sherman 42, Wallaby Way, Sydney
Posted: Sun Feb 12, 2012 6:07 am Post subject: c++ strin question
i use string as a password in console application like:
if enter string correct you can see program... and i wonder is possible to make it when entering password instead of letters you see * or some other caracter?
while(c != 13) //Loop until 'Enter' is pressed
{
c = getch();
password += c;
cout << "*";
}
I found this but apparently if you press delete or backspace it counts that as an asterisk. But basically what you are looking for is character masking.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum