1,080,680 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by yapkm01 which have been Voted Down

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 ..

clause a)

"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.

clause b)

"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"

I don't understand the clause b.

Any help is appreciated

yapkm01
Newbie Poster
24 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page generated in 1.6420 seconds using 2.46MB