Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <queue>
- #include <cmath>
- #include <algorithm>
- using namespace std;
- struct Student {
- int br_indeks;
- int godina_na_raganje;
- string ime, prezime;
- Student() {}
- Student(int _br_indeks, int _godina_na_raganje, string _ime, string _prezime) {
- br_indeks = _br_indeks;
- godina_na_raganje = _godina_na_raganje;
- ime = _ime;
- prezime = _prezime;
- }
- friend ostream& operator << (ostream &stream, Student s);
- };
- ostream& operator << (ostream &stream, Student s) {
- stream << s.ime << " " << s.prezime << " " << s.br_indeks << " "<< s.godina_na_raganje << endl;
- return stream;
- }
- int main() {
- Student s(123, 2001, "josif", "tepegjozov");
- cout << s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement