    #include <vector>
	#include <iostream>
	using namespace std;
	
	vector< vector< int > > MyFunc(int x_size, int y_size)
	{
		vector< vector< int > > array(y_size, vector< int >(x_size));
		
		int i = 0;
		for (int y = 0; y < array.size(); y++)
		{
			for (int x = 0; x < array[y].size(); x++)
			{
				// note the order of the index
				array[y][x] = i++;
			}
		}
		
		return array;
	}
	
	int main()
	{
		vector< vector< int > > bob = MyFunc(10, 5);
		for (int y = 0; y < bob.size(); y++)
		{
			for (int x = 0; x < bob[y].size(); x++)
			{
				cout << bob[y][x] << "\n";
			}
		}
	}