m reading c++ primer 4th edition by Stanley Lipmann and I'm on page 92 about value initialisation.
I just don't understand when about value initialisation. I browsed around and I know there are also default initialisation and zero-initialisation. Can anyone explain about value initialisation?
Coming to this paragraph ..
"Some classes does not define default constructor. We cannot initialise vector of such a type by specifying only a size, we must also specify an initial value"
I do understand the above but I find that the below contradict the above sentence.
"Element type might be of a class type that does not define any constructors. In this case, the library still creates a value-initialised object. It does so by value-initialising each member of that object"