InterviewSolution
Saved Bookmarks
| 1. |
What Is The Const Keyword Doing Here? |
|
Answer» There is a pointer to the OBJECT for which a function is CALLED known as the 'this' pointer. By DEFAULT the type of 'this' is X *const ( a constant pointer). The const keyword CHANGES the type to const X *const ( a constant pointer to constant DATA ). There is a pointer to the object for which a function is called known as the 'this' pointer. By default the type of 'this' is X *const ( a constant pointer). The const keyword changes the type to const X *const ( a constant pointer to constant data ). |
|