C++/Przeciążanie operatorów: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
→Operatory "bool" i "!": dlaczego są dwa if-y |
→Przykład zastosowania: instrukcje inicjujące |
||
Linia 25:
float srednia_ocen;
public:
Student(int nr=0, float sr=0)
};
</source>
Linia 40:
float srednia_ocen;
public:
Student(int nr=0, float sr=0)
friend ostream & operator<< (ostream &wyjscie, const Student &s);
};
Linia 46:
ostream & operator<< (ostream &wyjscie, const Student &s)
{
return wyjscie << "Nr indeksu
}
</source>
|