Here,whats the use of this pointer…is it for accessing private data member or something else…please elaborate it …pros and cons where to use this pointer n all…
Queue implementation using Circular array
@Nisha21
this pointer is used to access any and all members of the class. It simply refers to the current instance of the class. It can access private, public as well as protected members of the class. There are no such pros or cons for using it particularly. It is completely up to the programmer as to how they use them.
Refer to this article. I think it should help you out. https://www.tutorialspoint.com/cplusplus/cpp_this_pointer.htm
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.