I did not understand how the overloading of the 2 left and right shift operator is working?
Doubt regarding operator overloading
@Senjuti256 let’s assume a class Car having data members as price and model.
Also let a be an object of Car,
so when you do cin>>a, here >> is overloaded with parameters as istream(cin) and a,
so in the overloaded function, you can input the price and model normally.
Now you return reference of istream to tackle cascading, eg: cin>>a>>b,
similarly << is also overloaded.