title: expression must have arithmetic or unscoped enum type C++
body: <p>I am trying to make a password prompt using C++. My code is given below:</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  std::string operator * (std::string a, unsigned int b) {
      std::string output = &quot;&quot;;
      while (b--) {
          output += a;
      }
      return output;
  }
  int main(){
      std::string pword;
      std::string user;
      std::cout &lt;&lt; &quot;Enter username: &quot;;
      std::cin &gt;&gt; user;
      std::cout &lt;&lt; &quot;Enter password for user '&quot; &lt;&lt; user &lt;&lt; &quot;': &quot;;
      std::cin &gt;&gt; pword;
      std::string pword_asterix = (&quot;*&quot;) * pword.length();  // ERROR
      std::clog &lt;&lt; &quot;Noted user '&quot; &lt;&lt; user &lt;&lt; &quot;' and password '&quot; &lt;&lt; pword_asterix &lt;&lt; &quot;'.&quot;;
  </code></pre>
  <p>But I'm getting the following error from Visual Studio Code:</p>
  <blockquote>
  <p>expression must have arithmetic or unscoped enum type(Line 17)</p>
  </blockquote>
  <p>What should I do?</p>