Is it possible to call a this pointer in constructor & destructor?
this pointer
Collapse
X
-
Tags: None
-
To get the answer for your question refer this link
under this section
[10.7] Should you use the this pointer in the constructor?
Also please let us know what you have understood...Sh are your knowledge which will help you clear your doubts and help us to know how much the link was useful to you....
This is a homework for you -
That means i can call this pointer in the constructor by carefully cosidering the rule of initialization & declaration but what about this pointer call in destructor.
Because in the destructor you don't know in which order object members are called fo destruction.Comment
Comment