| | |
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 array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings struct temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






