template class Iterator { public: friend class Kontener; T (**wsk); protected: int actual; T2 &container; public: Iterator(T2 &cont):container(cont) { wsk = cont.tab; actual = 0; } Iterator & na_poczatek() { wsk = container.tab; actual = 0; return *this; } Iterator & na_koniec() { wsk = (container.tab + (SIZE-1)); actual = SIZE-1; return *this; } Iterator & za_koniec() { wsk = NULL; actual = -1; return *this; } Iterator & na_wezel(int indeks) { wsk = (container.tab + (indeks)); actual = indeks; return *this; } Iterator & operator++() { if(wsk && actual<(SIZE - 1)) { wsk = (container.tab + (actual + 1)); actual += 1; } else cout<<"Iterator jest juz na ostatnim miejscu lub jest poza tablica."<0) { wsk = (container.tab + (actual - 1)); actual -= 1; } else cout<<"Iterator jest juz na pierwszym miejscu lub jest poza tablica."<actual = it.actual; **this->wsk = **it.wsk; } return *this; } Iterator & operator==(Iterator &it) { if(&it == this) cout<<"To ten sam iterator."<actual == it.actual) cout<<"Sa takie same."<actual != it.actual) cout<<"Sa rozne."<