intiating lists in the constructor's initialization list
Posted
by bks
on Stack Overflow
See other posts from Stack Overflow
or by bks
Published on 2010-06-12T08:50:27Z
Indexed on
2010/06/12
8:52 UTC
Read the original article
Hit count: 221
i just moved from C to C++, and now work with lists.
i have a class called "message", and i need to have a class called "line",
which should have a list of messages in its properties. as i learned, the object's properties should be initialized in the constructor's initialization list, and i had the "urge" to initialize the messages list in addition to the rest of the properties (some strings and doubles). is that "urge" justified? does the list need to be initialized?
thank you in advance
© Stack Overflow or respective owner