Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Konyv
- {
- public:
- Konyv(string s, string c, int ev){}
- friend ostream& operator<<(ostream&os, const Konyv&k);
- string toString();
- ~Konyv();
- private:
- string szerzo;
- string cim;
- int kiadasEve;
- };
- ostream& operator<<(ostream&os, const Konyv&k) {}
- class Kotet:public Konyv
- {
- public:
- Kotet(string s, string c, int ev,string sorozatCim, int kotetszam){}
- friend ostream& operator<<(ostream&os, const Kotet&k);
- ~Kotet(){}
- private:
- string sorozatCime;
- int kotetSorszama;
- vector<Konyv*>sorozatreszek;
- };
- // Konyv a;
- Kotet*b=dynamic_cast<Kotet*>(a);
- ez a castolás jó?
- Meg szeretném állapítani hogy a Kotet-e
- void Konyvtar::add(Konyv*aktkonyv) {
- Kotet*d = dynamic_cast<Kotet*>(aktkonyv);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement