Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Data::Porownaj(const Data & wzor) const
- {
- if (this->Rok() == wzor.Rok()) {
- if (this->Miesiac() == wzor.Miesiac()) {
- if (this->Dzien() == wzor.Dzien()) {
- return 0;
- }
- else if (this->Dzien() > wzor.Dzien()) {
- return -1;
- }
- else if (this->Miesiac() < wzor.Miesiac()) return 1;
- }
- else if (this->Miesiac() > wzor.Miesiac()) {
- return -1;
- }
- else if (this->Miesiac() < wzor.Miesiac()) return 1;
- }
- else if (this->Rok() > wzor.Rok()) {
- return -1;
- }
- else if (this->Rok() < wzor.Rok()) return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment