ideone doesn't show any output
<p>this code is of problem <a href="http://www.spoj.com/problems/BASE/" rel="nofollow">http://www.spoj.com/problems/BASE/</a> and it runs fine on windows and linux but when i run it on ideone it does not show me any output. Can anyone tell me what is the reason behind this?</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;math.h&gt;
#include&lt;string.h&gt;
#include&lt;string&gt;
#include&lt;iostream&gt;

using namespace std;

long int convert_base10(char *num, int base)
{
int len, dig;
long int result = 0;
len = strlen(num);
//    printf("len = %d\n", len);
// converting to base 10
for(int i=0; i&lt;len; i++)
{
    if((num[len-i-1] &gt;= 'A') &amp;&amp; (num[len-i-1] &lt;= 'F'))
        dig = num[len-i-1] - 55;
    else
        dig = num[len-i-1] - 48;
    result +=  (dig * pow(base, i));
  //        printf("num[%d] = %d\n", len-i-1, dig);
}
return result;
}

void convert_basei(long int num, int base, string &amp;result1)
{
bool error = false;
int pos = 6;
char result[7], rem;
// initially storing space on all position
for(int i=0; i&lt;7; i++)
    result[i] = ' ';
while(num)
{
    if((num % base) &gt;= 10)
        rem = (num % base) + 55;
    else
        rem = (num % base) + 48;
    result[pos] = rem;//printf("result[%d] = %c\n", pos, rem);
    num /= base;//    printf("quotient = %d\n", num);
    pos--;
    if(pos &lt; 0 &amp;&amp; num &gt; 0)
    {
        error = true;
        break;
    }

}
if(error == true)
   result1 = "  ERROR";
else
    result1 = result;
//    cout&lt;&lt;"result = "&lt;&lt;result1&lt;&lt;endl;
}

int main()
{
char num[7];
string result;
int base1, base2;
while(scanf("%s%d%d", num, &amp;base1, &amp;base2) == 3)
{
//        printf("num = %s\nbase1 = %d\nbase2 = %d\n", num, base1, base2);
    long int temp = convert_base10(num, base1);
//        printf("temp = %ld\n", temp);
    convert_basei(temp, base2, result);
    cout&lt;&lt;result&lt;&lt;endl;
}
return 0;
}
</code></pre>
