On Apr 20, 11:25 pm, "Alf P. Steinbach" <al...@start.nowrote:
* subramanian10...@yahoo.com, India:
On Apr 20, 1:43 am, "Alf P. Steinbach" <al...@start.nowrote:
* subramanian10...@yahoo.com, India:
Is zero-initialization different from value_initialization ?
In the general case, yes. Value initialization reduces to zero initialization
for POD (Plain Old Data) types.
Please give me an example where zero-initialization is different from
value_initialization.
By value-initialization, I understand that all arithmetic type data
members will be set to zero, the pointer type data members will be set
to null pointer and for class type data object members, the
corresponding default ctor, if present, will be called(if default ctor
for the member object is not present, then the above process goes
recursively.)
Is my understanding correct ?
Kindly explain.
Thanks
V.Subramanian