| | |
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 |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






