char** 这样的变量,如何 申请 和 局部重新申请空间?? 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要看你的char **到底表示什么意思了,如果是字符型的二维数组的话,如下:char **p = new char* [rows];for(int nIndex = 0; nIndex < rows; ++nIndex) p[nIndex] = new char [nCols]; char **p= malloc(rows*ncols + rows*sizeof(char *));for(int nIndex = 0; nIndex < rows; ++nIndex) p[nIndex] = ((char *)p) + nIndex*ncols + rows*sizeof(char*); char **p= malloc(rows*ncols + rows*sizeof(char *));for(int nIndex = 0; nIndex < rows; ++nIndex) p[nIndex] = ((char *)p) + nIndex*ncols + rows*sizeof(char*); 用VC的ADO对象SQL编程为什么_variant_t类型的变量会被截断? 流媒体服务开发? 一个老程序员的建议---看完了xx ,你决定继续做编程 求助如何获得动态创建视图的句柄 我不会在VB里面调用DLL 请VC++同志帮忙把VB的这段VB改成VC++谢谢 不得不问,CList中存放着结构体,为何序列化时为空,代码是。。 如何得到IIS的目录 头发都急掉了,串口通信,请大虾指示一下? 圆拄 球体 平面与圆拄,球体的交形成的曲线如何表示 CreateInstance和Open操作后怎样判断是否成功? 能不能得到上一次光标在某个控件上停留的位置?
char **p = new char* [rows];
for(int nIndex = 0; nIndex < rows; ++nIndex)
p[nIndex] = new char [nCols];
for(int nIndex = 0; nIndex < rows; ++nIndex)
p[nIndex] = ((char *)p) + nIndex*ncols + rows*sizeof(char*);
for(int nIndex = 0; nIndex < rows; ++nIndex)
p[nIndex] = ((char *)p) + nIndex*ncols + rows*sizeof(char*);