title: Converting Binary to Decimal built-in function
body: <p>I have to do a binary to decimal conversion in C++.</p>
  
  <p>I know how to do this manually but I was wondering if there exists a function that can do it for me.</p>
  
  <p>For example if I have a decimal number and I wanna print it as a other-base number I just use setbase(base).</p>
  
  <pre><code>std::cout&lt;&lt;std::setbase(16)&lt;&lt;20; // prints 20 in base 16.
  </code></pre>
  
  <p>Is there any way to do something like that but to convert from binary to decimal?</p>