二维数组赋值问题
#include "stdio.h"
#include "malloc.h"
struct a
{
int *p;
int b;
};
void main()
{
struct a* temp;
temp = (struct a*)malloc( sizeof(struct a));
temp->p = (int *)malloc(2);
temp->p[0] = 4;//通过
temp->p[1] = 1;
printf("%d\n", temp->p[0]);
struct a* temp1;
temp1 = (struct a*)malloc( sizeof(struct a));
temp1->p = (int *)malloc(2*3);
temp1->p[0][0] = 4;
printf("%d\n", temp1->p[0][0]);//不通过 怎么给二位数组进行赋值
}