in lecture vector 04 what is THIS used in class car. plz clarify
Related to vector
Hey @avverma11057 this is a keyword that refers to the current instance of the class. There can be 3 main usage of this keyword in C++.
- It can be used to pass current object as a parameter to another method.
- It can be used to refer current class instance variable.
- It can be used to declare indexers.
You can use it whenever you work with constructor of a class.
can u provide some example or more information about or givr me some link?
Ya sure, below are attached link. Read from there only. It will be sufficient for you to understand
Gfg article is sufficient. Rest you can explore another too
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.