title: Any idea how to convert and Octal number to a decimal with recursion?
body: <p>I want to convert an octal number to a decimal number using recursion.
  So far i can write the correct number but backwards, i still need to swap the order, how can i do this? 
  My code (giving the backwards number):</p>
  
  <pre><code>void decimalToOctal(int num) {
     int  total = 0;
     if (num &gt; 0)
     {
         total = num % 8;
         num /= 8;
         cout &lt;&lt; total;
         decimalToOctal(num);
     }
  }
  </code></pre>
  
  <p>Imagine if the correct decimal number was 234, this code is giving 432.</p>