Devils are in the details :
default initialization
zero initialization
value initialization
Output:
- With default constructor, it will initialize the integrals iff it's called by new T();
- If it's user defined constructor, but without explicitly initialize integrals, even called by new T();
the integrals will not be initialized as integrals(); - If it's been called by new T;
no matter user define or default constructor, non of the integrals will be initialized.
default initialization
zero initialization
value initialization
Output:
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.