News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Problem with using CodeBlock 8.02

Started by Dony, April 05, 2008, 12:49:04 PM

Previous topic - Next topic

Dony

I have just download codeblocks-8.02mingw-setup.exe for Windows 2000 / XP / Vista
I 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???



[attachment deleted by admin]

MortenMacFly

Quote from: Dony on April 05, 2008, 12:49:04 PM
and I have a differen results (correct results).
Huh? I have no idea what that shall mean. Mind explaining a little more in detail? What do you mean with different results? The one file is red, the other green or what?! :P
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

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

Jenna

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.