what I really don't understand is why the author uses & to redefine a function already belonging to std class
He's not redefining a function.
He's creating a new function, called read
, that returns an istream&
.
The fact that it returns a reference is convention (matching the equivalent behaviour of standard library functions) but has very little to do with the fact that he's defining the function in the first place.
The standard library has no function with knowledge of the custom type Student_info
.