sir , for assigning values into the class containers, sie has used
this-> x=x;
this-> y=y;
what is this-> ?
Vector as a class
Hi… so let me explain this with u an example
class Graph{
int V;
public:
Graph(int V){
this->V = V;
}
};
here we use this variable because variable name declared above and used in function parameter are same
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.