Author
Topic: Problem with using CodeBlock 8.02 (Read 2062 times)

Dony

I have just download codeblocks-8.02mingw-setup.exe for Windows 2000 / XP / VistaI have istalled it on windows XP sp2(AMD Athlon(tm)XP) and Windows Vista (Intel Core2 Centrino Duo), and I have compile and execute the same project. Than I have compile the same project with Dev-C++ version 4 (Mingw compiler 2.95.2-1) [on SO WindowsXP] and with Pelle C for Windows version 4.50.113 and I have a differen results (correct results).I post the file .c in this forum. Could someone halp me please???

Dony

ok...if you read the code, you see that I have used a long double for computation (there are 4) and when I print its 2 of 4 are an overfloat results... but they must be more or less the same...if I compile and execute the program with "Pelles C for windows" it run and print 4 result that are almost the same

Moreover if I use a doulbe compiling and executing the program I have the same resutls with code blocks , dev-c++ and pelles C

If you compile you get two warnings, because the single "f" in "printf" wants a double, but in two cases you've got a "long double".So you get an overflow.You should take "Lf" instead of "f" in this cases.

A warning always shows that something unexpected might happen, even if the code compiles without errors.