I recently upgraded to kernel 2.0.20 from 1.2.13 (Caldera). I did it by
the book, I think - new libs, many new packages to take advantage of
and/or not break under the new kernel. Libc is 5.2.18, libg++ is
Well, lo and behold, now when I compile this program that in g++ (gcc
2.7.2-2 rpm from redhat) I get strange output. It's supposed to read an
int and two doubles, then compute the sum: here's what it gives me
Please enter an int: 44
You entered the integer 44. Thanks.
Please enter a double: 55.66
You entered the double 55.6600. Thanks.
Please enter another double: -123.5
You entered a second double, -1.67067e-3523. Thanks.
The sum of these three numbers is -1.87951e-3508. Have a nice day.
Judging from the gibberishiness of the last two numbers, I'd say
something isn't working right with a pointer, or something isn't getting
stored in the right place, or the linker is just plain screwed up.
Maybe some kind of data type error. But I'm darned if I can figure out
what's causing this.
Oh, and it's not the code. I've compiled the exact same program using
gcc 184.108.40.206 on an HP workstation and it gives the correct answer. I
can't believe that such a simple program would break on essentially the
same compiler on a different platform. If anybody has had this same
problem or recognizes what it is, I'd appreciate any help you might
Anthony W Becker CAS '98 Political Science
1707 Ridge Ave #204 Northwestern University
(847) 491-6079 Wearer of many hats.