| | |
hiding
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2004
Posts: 68
Reputation:
Solved Threads: 1
I didn't get ur point exactly........
However in c++ u can use getch(); .This will defenately take the character from the user but will not display over stdout.
For example : Think of typing a password.U type ur password but wht u see is merely a asterisk sign.Following code explains it better.
int k =5
do
{ character=getch(); /* These thing is done so that password is not visible*/
gotoxy(k,8) ;printf("*");
str8[i]=character;
k++;
i++;
}while(character != '.');
i--;
str8[i]='\0';
This will keep on entering a string to that array str8[] and will not display the original characters entered but instead of that will display a "*" till users presses a dot.
Instead of dot u can use any sentinel value as if ASCII charater of return key is 13.
However in c++ u can use getch(); .This will defenately take the character from the user but will not display over stdout.
For example : Think of typing a password.U type ur password but wht u see is merely a asterisk sign.Following code explains it better.
int k =5
do
{ character=getch(); /* These thing is done so that password is not visible*/
gotoxy(k,8) ;printf("*");
str8[i]=character;
k++;
i++;
}while(character != '.');
i--;
str8[i]='\0';
This will keep on entering a string to that array str8[] and will not display the original characters entered but instead of that will display a "*" till users presses a dot.
Instead of dot u can use any sentinel value as if ASCII charater of return key is 13.
•
•
Join Date: Nov 2004
Posts: 14
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by harshchandra
I didn't get ur point exactly........
However in c++ u can use getch(); .This will defenately take the character from the user but will not display over stdout.
For example : Think of typing a password.U type ur password but wht u see is merely a asterisk sign.Following code explains it better.
int k =5
do
{ character=getch(); /* These thing is done so that password is not visible*/
gotoxy(k,8) ;printf("*");
str8[i]=character;
k++;
i++;
}while(character != '.');
i--;
str8[i]='\0';
This will keep on entering a string to that array str8[] and will not display the original characters entered but instead of that will display a "*" till users presses a dot.
Instead of dot u can use any sentinel value as if ASCII charater of return key is 13.
thanks
![]() |
Similar Threads
- Folder Locking and Hiding in Windows XP (Computer Science)
- Clearification with information hiding (C++)
- GridView hiding cells dynamically (ASP.NET)
- Where is my 7.0 Gig hiding? (Windows 95 / 98 / Me)
- Hiding IP addy for WAN traffic? (Networking Hardware Configuration)
Other Threads in the C++ Forum
- Previous Thread: Quick Fix plz
- Next Thread: hi friends pls help me out
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





