我的Matrx班级被定义为
class Matrx
{
double A[50][50];
int m,n;
public:
Matrx(void);
Matrx(int a, int b)
{
m=a;
n=b;
}
Matrx operator +(Matrx b);
Matrx Transpose(Matrx b);
Matrx operator *(Matrx b);
CString printMatrx();
void readMatrx(double a[][]);
Matrx TransposeMat(Matrx b);
};
void Matrx::readMatrx(double a[][])
{
for(int i=0;i< m;i++)
{
for(int j=0;j< n;j++)
A[i][j]=a[i][j];
}
}
Run Code Online (Sandbox Code Playgroud)
intellisense给出如下错误
1 IntelliSense:阵列可能没有此类型的元素d:\ bmadaptive_dd_v1.02\matrx.h 17 27 TestServer
为什么?
如何传递二维数组作为函数的参数?
什么是包含BYTE数据的数组pData[1+2*i]<<8|pData[2+2*i]在哪里pData[ ]?我在main函数中有以下功能
{
..........
....
BYTE Receivebuff[2048];
..
ReceiveWavePacket(&Receivebuff[i], nNextStep);
....
...
..
}
Run Code Online (Sandbox Code Playgroud)
其中Receivebuff是BYTE类型的数组.
ReceiveWavePacket(BYTE * pData, UINT nSize)
{
CString strTest;
for(int i = 0 ; i < 60 ; i++)
{
strTest.Format("%d\n",(USHORT)(pData[1+2*i]<<8|pData[2+2*i]));
m_edStatData.SetWindowTextA(strTest);
}
}
Run Code Online (Sandbox Code Playgroud)
我想知道的意思" ,(USHORT)(pData[1+2*i]<<8|pData[2+2*i]).
任何人都可以帮帮我吗?