title: How to work with Base 8 (Octal) numbers?
body: <p>In C++, an octal number is defined by preceeding it with a <code>0</code>, example:</p>
  
  <pre><code>01 = 1
  010 = 8
  014 = 12
  </code></pre>
  
  <p>So I was experimenting how working with Base 8 in c++ works, and tried adding to it with a loop, like so:</p>
  
  <pre><code>int base8Number = 00;
  for (int i = 01; i &lt; 011; i+=01)
  {
      base8Number += i;
      cout &lt;&lt; base8Number &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>And apparently, C++ doesn't like working with octal numbers, the output I got is as follows:</p>
  
  <pre><code>1
  3
  6
  10
  15
  21
  28
  36
  </code></pre>
  
  <p>The most obvious reason I know it's not working in Base 8, is the <code>28</code> output as a result, since the <code>8</code> number isn't used in Base 8.</p>
  
  <p>So, my question: Can you work with Base 8 in c++, or is it just meant to be used as a constant, and if you can work with Base 8 in c++, how do you do it?</p>