I am writing a program in C++ where I am supposed to receive a string from user without displaying it on screen (for example: apassword). I tried using cin
and gets
to accept the string. But both will echo the characters entered by user in console.
So is there any function or any other way of doing it in C++?