PBYTE的有关问题
PBYTE的问题
CString str = "hello123 ";
PBYTE * pByte = (PBYTE *)str.GetBuffer(str.GetLength());
int nTemp = 0;
str.ReleaseBuffer();
while (*pByte!= '\0 ') {
nTemp++;
pByte++;
}
我想得到pByte里面的字符个数,但pByte++;一下把指针后移4个位置
------解决方案--------------------
PBYTE * pByte = (PBYTE *)str.GetBuffer(str.GetLength());
改成
PBYTE pByte = (PBYTE )str.GetBuffer(str.GetLength());
------解决方案--------------------
PBYTE pByte = (PBYTE )str.GetBuffer(str.GetLength());
PBYTE 就已经是 指针了 ...
CString str = "hello123 ";
PBYTE * pByte = (PBYTE *)str.GetBuffer(str.GetLength());
int nTemp = 0;
str.ReleaseBuffer();
while (*pByte!= '\0 ') {
nTemp++;
pByte++;
}
我想得到pByte里面的字符个数,但pByte++;一下把指针后移4个位置
------解决方案--------------------
PBYTE * pByte = (PBYTE *)str.GetBuffer(str.GetLength());
改成
PBYTE pByte = (PBYTE )str.GetBuffer(str.GetLength());
------解决方案--------------------
PBYTE pByte = (PBYTE )str.GetBuffer(str.GetLength());
PBYTE 就已经是 指针了 ...