why was he getting error hen he wasnt using const…and the error resolved after he made it a constant function
In time lapse 9:44 the use of const for function
He said it himself… Because you are not changing any of the data members value inside the function hence it should return a const type value. Also the input parameter is also const type there so type mismatch was occuring