*p is the 0 row
*p+1 is the first row
etc..
and i apply to each row a column

why its not working
??
Code:
#include <stdio.h>
#include <stdlib.h>

int main()
{
	int i=0;
    int **p=(int**)malloc(5*sizeof(int*));
	for (i=0;i<5;i++)
	{
	   *p+i=(int*)malloc(3*sizeof(int));

	}
	return 0;
}