C Program : Password Input Problem
- while((c=getch())!=13)
- {
- pass[z++]=c;
- printf("%c",'*');
- }
the problem is, suppose, if i press a wrong key n i want to delete it (backspace) then even backspace is taken as a character.. How to rectify the code??
Replies
-
rahul69Apply condition : If backspace then decrement the counter and continue
For screen move a step back and replace * with ' '
๐. Specify if any other doubt ๐
Gud luckk -
Vishal Sharmayeah i've did it this way before but the thing is, using a whitespace disturbs the password and even the buffer memory is getting wasted in this way..
I got it now ๐ that too in more efficient way.. using fflush() and fputs()
You are reading an archived discussion.
Related Posts
My name is Ravi
I'm student now studying 3rd year betech ece in yogivemana university proddatur
More intersted in doing mini project like radio TX and rx ,sensor based projects...
just a new member..please take care of me ๐
will anyone suggest an electronic project and can provide its circuit design..
and that is affordable..
please help me with this...
Columns are vertical members, For example: pillars.
As far as beams are concerned. it is easy to represent the type of loads acting on them by means of free body...
What is the basic difference between electrical and electronics engineering? Is it based on voltages or there are other factors as well?
Why are the power system ratings designed as multiples of 11kV? The reason may be for similar calculations, but that doesn't sound logical. Could someone explain?