C++/Przeciążanie operatorów: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Nie podano opisu zmian
Nie podano opisu zmian
Linia 80:
//...
'''public''':
'''int''' '''operator'''==(Student &q) {'''return''' nr_indeksu==q.nr_indeksu}; //to jest przeciez zle, w ciele klasy przeladowanie jest jedno argumentowe!
'''int''' '''operator'''==('''int''' &q) {'''return''' nr_indeksu==q}; //jw
};
Linia 106:
//...
'''public''':
'''int''' '''operator'''+ (Student & s, Student &q) {'''return''' (s.srednia + q.srednia +11) };
'''int''' '''operator'''+ (Student & s, '''int''' &q) {'''return''' (s.srednia - q / 30) };
};