password via istream

to be short, i need a (way/code preferably a manipulator of i stream..)to input a password(string) form the user without echoing it on screen...no library functions has to be used e.g. getpass() of the nonstandard conio.h

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

i have an idea but right now dont know how to implement it..
first the standard output buffer is changed to a local buffer.
now the string is read..it would not get echoed on the screen(std o/p device as the buffer has been changed)..
now the standard buffer is restored..

hey guys i tried it in google, comp.lang.c++ etc...all say there is no standard way...but guys i found this actually in Bjarne Stroustrup's book...so there is a way of achieving this...yet it is unknown..!

but guys i found this actually in Bjarne Stroustrup's book...so there is a way of achieving this...yet it is unknown..!

What exactly did Stroustrup say?

Oh and congrats on your new Mod positon laserlight!

Thank you.

Originally Posted by Bjarne Stroustrup (2000-10-14)

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

the actual question was to create two stream manipulators that toggles the echoing on and off.

Kindly provide the relevant quote from the book.

Originally Posted by Bjarne Stroustrup (2000-10-14)

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.