Please can someone help me write a simple password program for my program which prints out in stars(*).Thank you.
Asira18 0 Newbie Poster
Recommended Answers
Jump to Postmridul.ahuja: You, and the OP, need to be made aware that
getch()
(and the rest ofconio.h
) is not a standard C++ function, but rather is one specific to Turbo C++; some later compilers and IDEs have equivalents, but that doesn't change the basic fact that it will only work …
Jump to PostActually, in C++, you can use C functions, or C++ stream functions, including doing things like turning off echo in input streams, so you can do the mapping of input characters to things like '*'. The program can still get the real data and process it appropriately.
Jump to PostDeceptikon is correct; text echo is a function of the shell itself, not of the stream I/O (which is the same basic model for both the C I/O functions and the C++ iostream classes). The standard C/C++ I/O operations don't know or care where the text comes from, as it …
Jump to Postsigh basit_3, did you read the other replies in this thread? This is essentially the same as the code posted by mridul.ahuja, and has the same problem of using
getch()
that his code did.
All 15 Replies
mridul.ahuja 4 Coding Enthusiast
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
mridul.ahuja 4 Coding Enthusiast
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
DoctorH 0 Newbie Poster
mridul.ahuja 4 Coding Enthusiast
basit_3 0 Junior Poster in Training
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
basit_3 0 Junior Poster in Training
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
Syed Ammar 0 Newbie Poster
David W 131 Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.