Loop optimization

Steven Schveighoffer schveiguy at yahoo.com
Mon May 17 04:50:14 PDT 2010


On Fri, 14 May 2010 12:40:52 -0400, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Steven Schveighoffer:
>> In C/C++, the default value for doubles is 0.
>
> I think in C and C++ the default value for doubles is "uninitialized"  
> (that is anything).

You are probably right.  All I did to figure this out is print out the  
first element of the array in my C++ version of kai's code.  So it may be  
arbitrarily set to 0.

-Steve


More information about the Digitalmars-d-learn mailing list