title: How to display asterisks for password input only after two consecutive colons?
body: <p>I want to read input from user. After the user typed the sequence <code>::</code>, the rest of the input should be asterisks.</p>
  
  <p>For example: let's say user typed: <code>Alex::vn800</code>. On the screen, the output should be: <code>Alex::*****</code>.</p>
  
  <p>I have a function that reads input from user and display <code>*</code> on screen, but I didn't managed to use it in a middle of reading line.</p>
  
  <p>I tried to manipulate functions <code>getchar()</code> and <code>scanf()</code> to stop reading line after detecting a sequence of <code>::</code>, and then call the function but nothing worked.  </p>
  
  <p>What can I do?</p>
  
  <p><strong>Update</strong>: Hey! thanks for the answers.
  I fainlly solved the problem by using the library conio.h  - like in any other simple get-password code, just that I saprated it for cases according to what I want the screen will show and not just '*' for any case.</p>