title: Find the length of an integer in C++
body: <p>In Java, I use </p>
  
  <pre><code>int length = String.valueOf(input).length();
  </code></pre>
  
  <p>to find the length of an integer.</p>
  
  <p>My question is: Are there any similar ways to do so in C++?
  I have already tried the for loops and while loops such as:</p>
  
  <pre><code>while (input &gt; 0){
      input/=10;
      count++;
  </code></pre>
  
  <p>So, apart from the loops are there anything else available in C++. Thank you for your answer.</p>