I am trying to create an array of pointers to a set of two-dimensional arrays but cannot seem to get the thing working. Here's the function, which gets called six times. <br><br>void displacement_from_source(int X, int u_position[4][2],int* rx_displacement[6])<br>{<br> <br>int i,j;<br>int* rx;<br>rx=(int*)malloc(8*sizeof(int));<br>rx_displacement[X]=rx;<br><br> for (i=0;i<4;i++)<br> {<br> for (j=0;j<2;j++)<br> {<br> rx<i>[j]=u_position<i>[j];<br> printf("rx = %d,u= %d\n", rx<i>[j],u_position<i>[j]);<br> //printf("rx_displacement[X]=%d\n",rx_displacement[X]);<br> }<br> }<br>}<br><br>When I run this for a one dimensional array I have no problem. Obviously I am doing something stupid with the pointers to the two-dimensional arrays. I have tried all sorts of things but no luck. I would really appreciate some help. Thanks.<br><br>Ian (BigE)