Advertisement
Guest User

Untitled

a guest
Dec 26th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #ifndef PAKET_H
  2. #define PAKET_H
  3.  
  4. #include "Roba.h"
  5. #include "Zbirka.h"
  6.  
  7. class Paket : public Roba{
  8. Zbirka<Roba*> zr;
  9. protected:
  10. void pisi(ostream& iz) const override { for(auto i=0;i<zr.DohD()i++) iz<<(*zr[i]); }
  11. public:
  12. Paket(int i) :zr(i) {}
  13. friend ostream& operator<<(ostream& iz, const Paket& p){
  14. iz << "["; p.pisi(iz); iz << "]";
  15. }
  16. Paket& operator+=(const Roba& r){
  17. zr += r->kopija();
  18. return this;
  19. }
  20. };
  21. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement