title: Show * while I input (Hide/mask input)
body: <p>I am in the process of getting <strong>password</strong> as input.
  I have gone through various examples but they either used while loop or SETCONSOLE method. Both had issues.
  Implementing while loop printed 1 * before I even entered a char. The other method used echo to <strong>HIDE</strong> the characters while I typed whereas I want to be printed. I would appreciate helping me masking my input with a * using SETCONSOLE method. I would be greatly obliged. The code's attached !</p>
  
  <pre><code> void signup(){
      gotoxy(10, 10);
      string n, p1,p2;
       cout &lt;&lt; "Enter your username: " &lt;&lt; endl; // TEST if username already       exists
  gotoxy(31, 10);
  cin &gt;&gt; n;
  lp:
  gotoxy(10, 11);
  cout &lt;&lt; "Enter your password: " &lt;&lt; endl; // TEST if username already exists
  gotoxy(31, 11);
  
  getline(cin, p1);
  system("cls");
  gotoxy(10, 10);
  cout &lt;&lt; "Re-Enter your password to confirm: " &lt;&lt; endl; // TEST if username already exists
  gotoxy(45, 10);
  getline(cin, p2);
  
  
  
  if (p2!=p1)
  {
      system("cls");
      gotoxy(10, 10);
      cout &lt;&lt; "Passwords donot match! Please enter again!";
          goto lp;
  }
  </code></pre>
  
  <p>}</p>