We have Escape sequences in C++
Dont we have any escape sequence for displaying astriek (****) when i want a user to enter a 4 digit PIN (int).
There is no standard way in c++ to have an
* replace a character while typing.
As Nathan said, there is no standard way. The normal way we do this is to read one character at a time, and for each character we output one asterisk, flushing the output stream so it appears on the terminal/window immediately. It would be a loop with only about 3 lines of code to do. Write it and then put it into your personal toolbox to use when needed.