POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 05:13:40 EDT (-0400)
  Re: C++ questions  
From: Fredrik Eriksson
Date: 24 Sep 2008 18:17:10
Message: <op.uh0auvb47bxctx@e6600>
On Wed, 24 Sep 2008 23:51:27 +0200, Warp <war### [at] tagpovrayorg> wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> More exactly, in C at least, any variables allocated statically start
>> with a default value of zero appropriate for their type. That includes
>> static variables allocated inside a function.
>
>   It would be interesting to see a quote from the C standard.

How about the C++ standard?



"The storage for objects with static storage duration (3.7.1) shall be  
zero-initialized (8.5) before any other initialization takes place."



-- 
FE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.