Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "human.h"
- using namespace std;
- class Student : virtual public Human {
- protected:
- unsigned id;
- int vstup;
- public:
- Student() : id(), vstup() {}
- Student(string na1, string su1, int d1, unsigned i, int v) :Human(na1, su1, d1), id(i), vstup(v) {}
- Student(const Student& s) :Human(s), id(s.id), vstup(s.vstup) {}
- friend ostream& operator<<(ostream& out, const Student& s) {
- out << (Human&)s << "\t" << "ID Card:" << s.id << "\t" << "Data of vstupu:" << s.vstup << endl;
- return out;
- }
- friend istream& operator>>(istream& in, Student& s) {
- in >> (Human&)s;
- in >> s.id;
- in >> s.vstup;
- return in;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement