default initialization

default initialization

This is the initialization performed when a variable is constructed with no initializer.

Syntax

T object ; (1)
new T ;

new T ( ) ; (until c++03).

(2)

Explanation

Default initialization is performed in three situations:

1) when a variable with automatic, static, or thread-local storage duration is