#include <iostream>
#include <vector>

using namespace std;

template <class tVrednost>
class Matrica
{
public:
	Matrica( int i, int j )
		{
		_Elementi.resize( i );
		for( int k=0; k<i; k++ )
			_Elementi[k].resize(j);
		}
		
	Matrica( int i, int j, tVrednost t )
		{
		_Elementi.resize( i );
		for( int k=0; k<i; k++ ){
			_Elementi[k].resize(j);
			for( int l=0; l<j; l++ )
				_Elementi[k][l] = t;
			}
		}
		
	vector<tVrednost>& operator[] ( unsigned i )
		{ return _Elementi[i]; }

	const vector<tVrednost>& operator[] ( unsigned i ) const
		{ return _Elementi[i]; }
		
private:
	vector< vector<tVrednost> > _Elementi;
};

main()
{
	Matrica<int> m(10,20);
	for( int i=0; i<10; i++ )
		for( int j=0; j<20; j++ )
			m[i][j] = i+j;
			
	return 0;
}

