#include <iostream>

using namespace std;

int x;

class Niz
{
public:
	Niz()
		{}
		
	int& operator[] ( unsigned )
		{ return x; }
		
	int Velicina() 
		{ return 0; }
		
	void PromeniVelicinu( unsigned )
		{}
		
	void DodajNaKraj( int )
		{}
		
	void ObrisiSaKraja()
		{}
		
	int Poslednji()
		{ return 0; }	
};

main()
{
	cout << "Punjenje i citanje elemenata niza:" << endl;
	Niz a;
	for( int i=0; i<10; i++ )
		a[i] = i;
	
	cout << a.Velicina() << endl;
	for( int i=0; i<a.Velicina(); i++ )
		cout << a[i] << ' ';
	cout << endl;
	
	cout << "Promena velicine niza:" << endl;
	a.PromeniVelicinu( 5 );
	cout << a.Velicina() << endl;
	for( int i=0; i<a.Velicina(); i++ )
		cout << a[i] << ' ';
	cout << endl;
	
	cout << "Konstruktor kopije:" << endl;
	Niz b=a;
	cout << b.Velicina() << endl;
	for( int i=0; i<b.Velicina(); i++ )
		cout << b[i] << ' ';

	cout << "Dodavanje na kraj:" << endl;
	for( int i=100; i<150; i++ )
		a.DodajNaKraj( i );
	cout << a.Velicina() << endl;
	
	cout << "Brisanje sa kraja:" << endl;
	for( int i=0; i<20; i++ )
		a.ObrisiSaKraja();
	cout << a.Velicina() << endl;
	cout << a.Poslednji() << endl;
		
	cout << "Pristupanje 'na preskok':" << endl;
	a[1000] = 212121;
	cout << a.Velicina() << endl;
	cout << a[1000] << endl;
	
	cout << "Proveru da li je kopija menjana:" << endl;
	cout << b.Velicina() << endl;
	for( int i=0; i<b.Velicina(); i++ )
		cout << b[i] << ' ';
	
	cout << "Operator dodeljivanja:" << endl;
	b = a;
	cout << b.Velicina() << endl;

	return 0;		
}
