/** * Przyklad 2 * Zwracanie obiektu przez funkcje */ #include using namespace std; //Definicja klasy Student class Student { public: //publiczne pola skladowe const char * imie; const char * nazwisko; unsigned int numer_indeksu; int oceny[100]; int liczba_ocen; }; //funkcja moze zwracac obiekt Student utworz_studenta(const char * imie, const char * nazwisko, int numer_indeksu) { Student s; s.numer_indeksu = 123456; s.imie = "Jan"; s.nazwisko = "Kowalski"; s.oceny[0] = 5; s.oceny[1] = 4; s.liczba_ocen = 2; return s; } int main() { //Tworzymy obiekt klasy Student za pomoca funkcji Student student1 = utworz_studenta("Jan", "Kowalski", 123456); cout <