Hi!
I found something really weird! I think it's a bug in mingw gcc 3.4.4 (The compiler that came with the old codeblocks RC2)
Here's an example:
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int i,a;
for(i=0;i<10;i++){
a = pow(10,i);
printf("%d\n",a);
}
return 0;
}
Output will be:
1
10
99
1000
9999
100000
1000000
9999999
99999999
999999999
If i use
instead of
, output will be as expected. (1,10,100,1000,10000,...)
If i use
output will be also as expected. The problem occurs only if i use a variable as an argument.
Can you confirm this?
What is the most recent stable version of MingW?
My other problem is that i don't know how to compile gcc or gdb (of course i want to do this with codeblocks
)