Sunday, February 20 21:50:07
Hello,
When I compile the following 5lines of code with `gcc -Wall -pedantic', I
get no warnings or any errors. However when I run the compiled
program I get the error: Floating point exception .
Anyone knows what I should fix ? I already tryd the different
storage types float, etc.. But then gcc complains warning: long int
format, int arg... etc... ?
I am using gcc version: 2.95.4
#include <stdio.h>
int main(void) {
int red = 0;
int green = 128;
int blue = 0;
printf("%d %d %d\n", (100 / (256 / red)),
(100 / (256 / green)), (100 / (256 / blue)));
return 0;
}
Thnkx.. J.
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming"
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html