why have we passed student as a const and as a reference and where are we using operator overloading in the main in the video
Regarding the bool operator
Hello @aslesha.j7,
-
we have passed student as const because we are just reading it and are not making any changes to it’s data members.
-
We are passing it as reference to avoid the call to copy constructor.
-
We have not used it anywhere in the code.
BTW, it seems like if you have skipped the videos of OOPS.
Even if you haven’t, i would suggest you to go through them again.
Hope, this would help.
give a like if you are satisfied.