float init 0 request
Walter Bright
newshound2 at digitalmars.com
Sun Aug 16 02:00:29 UTC 2026
On 8/15/2026 3:13 AM, pete wrote:
> typedef struct VkClearDepthStencilValue {
> float depth = 0;
> uint32_t stencil;
> } VkClearDepthStencilValue;
will default initialize .depth to 0.0. May I suggest doing a grep across your
C++ derived declarations looking for floats and doubles.
BTW, C and C++ will default initialize all variables to garbage when they are
declared as a function local! Those are very hard to track down. I once spent 3
days trying to track one down. It scarred me for life.
More information about the Digitalmars-d
mailing list