Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class uczen{
- public:
- string imie, nazwisko;
- int klasa;
- uczen(string im, string nazw, int kl){
- imie = im;
- nazwisko = nazw;
- klasa = kl;
- }
- };
- ostream &operator<<(ostream &out, uczen u){
- out << u.nazwisko << " " << u.imie << ", uczen " << u.klasa << " kalsy";
- return out;
- }
- int main()
- {
- uczen u1("Jan", "Kowalski", 3);
- cout << u1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement