coverity - Does C++ initialize integers to zero automatically? -
i've noticed several coverity (static-analysis tool) errors of type 'uninitialized scalar variable' high impact. lot of them ints don't initialized.
would initializing them 0 different c++ default?
does c++ initialize integers 0 automatically?
for automatic variables:
some compilers might standard not require it. conforming implementation leave them uninitialized garbage values.
for static variables:
they must initialized 0 unless explicitly initialized otherwise.
Comments
Post a Comment