#include "wektor.h"
#include <iostream>

using namespace std;
int main()
{
	Wektor<int> liczby;
	cout << "Tworze pusty wektor" << endl;
	cout << "Rozmiar " << liczby.Rozmiar() << " elementow " << liczby.IleElementow() << endl;
	
	cout << "\nTworze pusty wektor o  rozmiarze 100" << endl;
	Wektor<double> liczby2(100);
	cout << "Rozmiar " << liczby2.Rozmiar() << " elementow " << liczby2.IleElementow() << endl;

	cout << "\nDodaje 50 liczb do wektora" << endl;
	for(int i=0;i<50;i++) 
	{
		liczby.Dodaj(i);
		cout << "Wektor= ";
		for(int j=0;j<liczby.IleElementow();j++) cout << liczby[j] << " "; 
		cout << endl;
		cout << "Rozmiar " << liczby.Rozmiar() << " elementow " << liczby.IleElementow() << endl;
	}

	cout << "\nKopiuje elementy do nowego wektora" << endl;
	Wektor<int> wektor2=liczby;
	cout << "Wektor= ";
	for(int j=0;j<liczby.IleElementow();j++) cout << liczby[j] << " "; 
	cout << endl;
	cout << "Rozmiar " << liczby.Rozmiar() << " elementow " << liczby.IleElementow() << endl;

	cout << "\nUsuwam wszystko z wektora" << endl;
	while(liczby.IleElementow()>0)
	{
		liczby.UsunOstatni();
		cout << "Wektor= ";
		for(int j=0;j<liczby.IleElementow();j++) cout << liczby[j] << " "; 
		cout << endl;
		cout << "Rozmiar " << liczby.Rozmiar() << " elementow " << liczby.IleElementow() << endl;
	
	}


	 
	
}