Friend function strange behaviour

Why should anyone want to use friend functions? Just add simple getter for Cource.grade member and lasy getter for Student.avg. This will eliminate the possibility to get garbage instead of data.
Also, use std::vector and pass them throught std::vector&, not arrays and pointers.

Leave a Comment