Array[i].getAverageGrade
is a function. You can compare that function to another function (like Array[j].getAverageGrade
) but what you really want is to
- call that function
-
compare the result to the result of calling the other function:
Array[i].getAverageGrade() == Array[j].getAverageGrade()
BTW: Please keep in mind what others have told you about comparing double
values.
1
solved Same average function c++ [closed]