+ 1

how to get * instead of characters while typing password?

19th Jun 2016, 6:04 AM
Tanish Agarwal
Tanish Agarwal - avatar
6 Antworten
+ 2
just giving the algorithm, declare a single char ch declare a string s getch(ch) int i=0 while ch!= (enter) or (space) { getch(ch) s[i++]=ch cout<<"*" } hope this helps
19th Jun 2016, 10:59 AM
Tushar Purang
+ 2
I have attached the class file here Note: I haven't taken care for special key like up/down key etc here is the link: https://drive.google.com/open?id=0B4YLt8CgLlkXYU1ONmRyQmdCU3c enjoy😃😃
19th Jun 2016, 12:32 PM
Abhishek Kumar
Abhishek Kumar - avatar
0
are you writing console program ??
19th Jun 2016, 7:34 AM
Abhishek Kumar
Abhishek Kumar - avatar
0
ya
19th Jun 2016, 8:01 AM
Tanish Agarwal
Tanish Agarwal - avatar
0
tushar nd abhishek thnx that really helped
19th Jun 2016, 6:00 PM
Tanish Agarwal
Tanish Agarwal - avatar
0
no problem 😃 just vote the answer thanks
19th Jun 2016, 6:58 PM
Abhishek Kumar
Abhishek Kumar - avatar