Vector Of Vecotrs Using Thrust

Hello Everyone,
I am trying to build a program which develops a vector of vectors using Thrust in CUDA.
I managed to build the vector of vectors but now i cannot figure out how to manipulate each element separately within that.

Following is my code :

thrust::device_vector<thrust::device_vector<float> > Vec(4);
	for(int i=0;i<Vec.size();i++)
	{
		Vec.push_back(thrust::device_vector<float>(5,6));
	}

for(int i=0;i<Vec.size();i++)
		{
			for(int j=0;j<5;j++)
			{
				std::cout<<Vec[i][j];          //This line gives an error
			}
		}

Error: No operator “” matches these operands

I would like to know how to access each element separatly within this vector of vectors now.
Thank You.

You cannot create and use correctly a device_vector of device_vector

This is a limitation of thrust device_vector. If you do any google searches on this topic you will find similar questions and answers.

If i want to use vectors of vector. Then how can I do that?
Actually I want to use it for storing image and sending it to cuda kernel

One possible approach: Use an array of pointers.