QUOTE(XenoSophist @ 16 Oct, 2007 - 10:02 AM)

Jjhaag: I thought that if primitive types were not initialized, the compiler would assign default initial values. For double, this would be 0.0.
Many compilers try to do this, but it's not necessarily true.
On my machine, using gcc 3.4.2, the value of temp is 1.86931e-307, which might seem like it's small enough to be basically zero. That might work for addition and subtraction, but will not provide the expected result for a zero argument to multiplication, division, or the relational operators.
And if I change the variables to ints, it winds up being initialized to 4247014. So it's not something you can depend on.
I'm actually not sure what the standard has to say on this one. Anyone?
-jjh