title: the base argument of std::stoi
body: <p>The <code>stoi</code> function of c++ is defined as:</p>
  
  <pre><code>int stoi(const std::string&amp; str, std::size_t* pos = 0, int base = 10);
  </code></pre>
  
  <p>as you can see, the <code>base</code> argument is defaulted as <code>10</code>, so by default it could only handle decimal numbers. By setting <code>base</code> to <code>0</code>, it could handle numbers by their prefixes. This is same behavior as <code>strtol</code>, so why is the default value being set to <code>10</code>, rather than <code>0</code>?</p>