Dynamic array of queue

In reply to kumar-vin:

I think, following code will solve your purpose.


 int q[][$];
 initial begin
   q = new[2];
   foreach(q[i])
   begin
     repeat(2) q[i].push_back($urandom_range(0,255));
   end 
   foreach(q[i])
   begin
     for(int j =0; j<q[i].size(); j ++)
          $display("I %0d J %0d Q[%0d][%0d] : %0d", i, j, i, j, q[i][j]);
   end
 end

Note that, i am pushing random data between 0 to 255, you can do as per your requirement.