| | |
Input a "password" string
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
•
•
•
•
Originally Posted by hail2dthief
No, that's not what i'm talking about. What I want is when I enter a string, the asterisks will come out on the screen. Just like when you enter your password to log in to this website.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
C++ Syntax (Toggle Plain Text)
//Warning,written by hand.Mistakes are possible void pass(char *s,int len,char mask='*') { int loc = 0; char p; int x = getx(); int y = gety(); do { p = getch(); if(p == '\r') // \r = enter { s[loc] = 0; break; } else if(p == '\b') // \b means backspace { if(loc>0) { s[loc]=0; loc-- gotoxy(x-1,y); cout<<" "; gotoxy(--x,y); } } else { s[loc++] = p; x++; cout<<m; } } while(true); }
![]() |
Similar Threads
- how can you input a string, clear the screen, then print Hello "string" (Assembly)
- Help me in username and password validation through accessing the database (ASP.NET)
Other Threads in the C++ Forum
- Previous Thread: merged:nesting loops
- Next Thread: *Pointer program problem.
| 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 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 linker 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






