数组指针数组(array pointer array):
该怎么定义和使用呢?
如下:
//定义
#define MsgCnt 3
#define MsgLen 8
typedef char( *MsgsPtr )[MsgCnt][MsgLen];
MsgArray strs1 = {"asd","ds","dddd"};
MsgArray strs2 = {"ass","dsds","dd"};
MsgsPtr apa2[2] = {&strs1, &strs2}
,pArr = 0;
//用法
printf("str2[1]=\"%s\", (*pArr)[1]=\"%s\"\n", str2[1], (*pArr)[1]);
//输出为
//str2[1]="dsds", (*pArr)[1]="dsds"