CArray<double *,double *> Matrix;for(i = 0; i<linerow; i++)
{m_fileIn.ReadString(temp);
m_matrixLine.Add(newrow);
m_matrixLine[i]=new double[linecol];
ZeroMemory(m_matrixLine[i],linecol*sizeof(double));m_matrixRoad.Add(newrow);
m_matrixRoad[i]=new double[4];
ZeroMemory(m_matrixRoad[i],4*sizeof(double));x = 0 ;
for(j = 0; j<linecol; j++)
{
y = temp.Find(",",x);
tempNum = temp.Mid(x,y);
m_matrixLine[i][j]=atof(tempNum);
x = y + 1;
}
}
//下面这条语句提示错误
m_matrixRoad[1,1] = (m_matrixLine[1,1]+m_matrixLine[1,2])/2;
error C2110: cannot add two pointers
{m_fileIn.ReadString(temp);
m_matrixLine.Add(newrow);
m_matrixLine[i]=new double[linecol];
ZeroMemory(m_matrixLine[i],linecol*sizeof(double));m_matrixRoad.Add(newrow);
m_matrixRoad[i]=new double[4];
ZeroMemory(m_matrixRoad[i],4*sizeof(double));x = 0 ;
for(j = 0; j<linecol; j++)
{
y = temp.Find(",",x);
tempNum = temp.Mid(x,y);
m_matrixLine[i][j]=atof(tempNum);
x = y + 1;
}
}
//下面这条语句提示错误
m_matrixRoad[1,1] = (m_matrixLine[1,1]+m_matrixLine[1,2])/2;
error C2110: cannot add two pointers
解决方案 »
- 打包一个程序//安装完毕在控制面板添加与删除程序没有....
- 请问VC内dll与function pointer和static member的问题
- LINK : fatal error LNK1104: cannot open file ".\Debug\XXXX.obj"
- 类似MSN Shell的功能如何实现?(有建议者皆有分,分不够会继续增加)
- 哪里有用InstallShield制作VC安装程序的详细资料
- unknown software exception如何解决?
- 请问如何得到类名classname?
- VC程序调用了VB程序,VC先运行,到了VB的地方执行VB程序,然后继续VC后面的程序,怎么能控制顺序执行完VC
- 求助高手帮忙啊
- 谁有FAT32的资料
- SDI程序,如何改变外框架和工具条、菜单条的颜色,不是视图的背景色
- 如何将 COM 程序打包成 cab 文件,让用户在网页中安装
=>
m_matrixRoad[1][1] = (m_matrixLine[1][1]+m_matrixLine[1][2])/2;