By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,332 Members | 1,404 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,332 IT Pros & Developers. It's quick & easy.

console input

P: n/a
Is there a way to get input from the keyboard without
echoing what was typed in standard c++. like
for a password field.
Thanks
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Jim Westwood wrote:
Is there a way to get input from the keyboard without
echoing what was typed in standard c++. like
for a password field.
Thanks


Always have a look into the FAQ list first:
http://www.parashift.com/c++-faq-lit...html#faq-15.18

Jul 22 '05 #2

P: n/a

"Rolf Magnus" <ra******@t-online.de> wrote in message
news:bq*************@news.t-online.com...
Jim Westwood wrote:
Is there a way to get input from the keyboard without
echoing what was typed in standard c++. like
for a password field.
Thanks


Always have a look into the FAQ list first:
http://www.parashift.com/c++-faq-lit...html#faq-15.18


your right im sorry I was in a rush you know how it can be when you have a
problem when your witing a program
and you want the answer realy bad. posting to a newsgroup is the laziest
quickest way sorry

if anyone else is reading this the answer is no.



Jul 22 '05 #3

P: n/a
I know I'm new at this so maybe I missed the bigger question.....but I use
getche() and getch() fairly frequently.
getch() does not echo characters to the screen while getche() does.
Maybe I'm seeing something that is OS or compiler specific? Interesting.

Thom

"Jim Westwood" <sp**@spam.com> wrote in message
news:bq**********@kermit.esat.net...

"Rolf Magnus" <ra******@t-online.de> wrote in message
news:bq*************@news.t-online.com...
Jim Westwood wrote:
Is there a way to get input from the keyboard without
echoing what was typed in standard c++. like
for a password field.
Thanks


Always have a look into the FAQ list first:
http://www.parashift.com/c++-faq-lit...html#faq-15.18


your right im sorry I was in a rush you know how it can be when you have a
problem when your witing a program
and you want the answer realy bad. posting to a newsgroup is the laziest
quickest way sorry

if anyone else is reading this the answer is no.


Jul 22 '05 #4

P: n/a
"Thom" <la*****@charter.net> wrote in message
news:vs************@corp.supernews.com...
I know I'm new at this so maybe I missed the bigger question.....but I use
getche() and getch() fairly frequently.
Neither of those functions is part of standard C++.
getch() does not echo characters to the screen while getche() does.
Maybe I'm seeing something that is OS or compiler specific?
Completely implementation-specific.
Interesting.


Not here. :-)

BTW please don't top-post.

-Mike
Jul 22 '05 #5

P: n/a
"Thom" <la*****@charter.net> wrote:
I know I'm new at this so maybe I missed the bigger question.....but I use
getche() and getch() fairly frequently.
getch() does not echo characters to the screen while getche() does.
Maybe I'm seeing something that is OS or compiler specific? Interesting.


Yes, those are platform specific, and mixing in calls like that with
stdio or iostreams creates problems of its own. Platform specific
"console" operations usually have their own internal buffers, or no
buffers, and have no access to stdio or iostreams. Sometimes the
behavior is different in annoying ways. At least one favorite console
application I use has something like 'getch' in a loop, and ends up
consuming 100% CPU for I/O polling.

Just be prepared for surprises if you start using a platform's console
operations, especially mixing them with iostreams.

--
Dave O'Hearn
Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.