vyshe (int tir)
{tiraj> tir;
}
& operator>> (istream & stream, TPress & obj)
{. Vvod (); stream;
}
& operator <<(ostream & stream, TPress & obj)
{. Vyvod (); stream;
}
TPress :: operator == (TPress obj)
{(obj.name == name) && (obj.type == type) && (obj.tiraj == tiraj);
}
ProTPress: TPress
{: price; tema; ()
{();
}
isTematica (string t)
{t == tema;
}
Vvod ()
{initName; initType; initTiraj; initPrice; initTema; <<"Vvedite naimenovanie, typ (gazeta-1; jurnal-2), tiraj, cena, tamatica:
{= initName; = initType; = initTiraj; = initPrice; = initTema;
} else
{<<"Neverny vvod" <
} true;
}
Vyvod ()
{<<"Name:" <
{<<"apteka";
} <
}
istream & operator>> (istream & stream, ProTPress & obj)
{. Vvod (); stream;
}
ostream & operator <<(ostream & stream, ProTPress & obj)
{. Vyvod (); stream;
}
};
int main ()
{* presses [100]; n;
<<"Vvedite kol-vo med-ov:";>> n; (int i = 0; i
{[i] = new ProTPress ();>> * presses [i];
}
tema; <<"Vvedite tamaticu:";>> tema;
(int i = 0; i
{(presses [i] -> isTematica (tema))
{<<* presses [i];
}
} ("pause"); 0;
}