title: Displaying *s on console when reading password
body: <p>I have been trying to make a brute-force program in C++, for a school project, but I want to make the password you enter censored, so instead of like password it would be <strong><em>*</em>*</strong>
  PS it's an console application</p>
  
  <p>This is my C++ Code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  char chars[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','W','R','S','T','U','V','W','X','Y','Z'};
  string t;
  
  void checkPassword(string password);
  void recurse(int width, int position, string baseString);
  int  main() {
    cout &lt;&lt; "Enter a Password: " &lt;&lt; endl;
  
    cin &gt;&gt; t;
    int maxChars = 13;
    for(int i=0;i&lt;maxChars+1;i++) {
      cout &lt;&lt; "checking passwords width [" &lt;&lt; i &lt;&lt; "]..." &lt;&lt; endl;
      recurse(i,0,"");
  
    }
    return 0;
  }
  void recurse(int width, int position, string baseString) {
    for(int i=0;i&lt;70;i++) {
      if (position &lt; width-1) {
        recurse(width, position + 1, baseString+chars[i]);
      }
      checkPassword(baseString+chars[i]);
    }
  }
  void checkPassword(string password) {
    if (password==t) {
      cout &lt;&lt; "Match Found: " &lt;&lt; password &lt;&lt; "" &lt;&lt; endl;
      return;
    }
  }
  </code></pre>
  
  <p>I have tried a lot but I can't seem to get it working, thanks in advance.</p>